-
-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
Description
Just wondering if gocofig will consider dealing with interfaces and pointers in struct definitions
Currently I have the below code :
package core
import (
"github.com/fulldump/goconfig"
"laika/pkg/provider"
)
var Config *LaikaConfig
type LaikaConfig struct {
Provider Provider
}
func init(){
Config = defaultConfiguration()
goconfig.Read(Config)
}
func defaultConfiguration() *LaikaConfig {
return &LaikaConfig{
Provider: Slack{
Token: "********,
},
}
}
type Provider interface {
GetSecurityInfo() map[string]string
}
type Slack struct {
//Token field
Token string
//Channel field
Channel string
}
func (slack Slack) GetSecurityInfo() map[string]string{
return map[string]string{
provider.SlackToken: slack.Token,
}
}
and the attached error occurs.
