admin
                                
                                
                                
                                    admin copied to clipboard
                            
                            
                            
                        No `AdminConfig` in dep package
Hello, I'm trying to use admin via dep package manager, but it causes error like:
./main.go:179:22: undefined: admin.AdminConfig
My dep package are:
...
[[constraint]]
  name = "github.com/jinzhu/gorm"
  version = "1.9.2"
[[constraint]]
  name = "github.com/qor/qor"
  version = "1.0.0"
[[constraint]]
  name = "github.com/qor/admin"
  version = "1.0.0"
...
and error is being caused when using admin.AdminConfig like below:
db, err := gorm.Open("mysql", "root:root@tcp(127.0.0.1:3306)/delta_auth?charset=utf8&parseTime=true")
if err != nil {
	panic(err)
}
defer db.Close()
db.AutoMigrate(&Userinfo{})
Admin := admin.New(&admin.AdminConfig{DB: db})
...
                                    
                                    
                                    
                                
I checked package inside, and it does not have AdminConfig in admin.go, different with master branch version:
type Admin struct {
	Config           *qor.Config
	SiteName         string
	I18n             I18n
	menus            []*Menu
	resources        []*Resource
	searchResources  []*Resource
	auth             Auth
	router           *Router
	funcMaps         template.FuncMap
	metaConfigorMaps map[string]func(*Meta)
}
I update qor package to master branch version, but it caused other problem as:
delta-auth/vendor/github.com/qor/qor/resource
vendor/github.com/qor/qor/resource/meta.go:130:38: cannot use roles (type []interface {}) as type []string in argument to meta.Permission.HasPermission
vendor/github.com/qor/qor/resource/resource.go:164:37: cannot use roles (type []interface {}) as type []string in argument to res.Permission.HasPermission
How can I fix it?
duplicate of https://github.com/qor/qor/issues/214
(please don't ask me why this is still an issue. Has been like this way to long...)