losing my mind

This commit is contained in:
A.Unger
2021-11-11 15:12:37 +01:00
parent a29f10e764
commit 3580e16771
21 changed files with 59 additions and 66 deletions
+3 -13
View File
@@ -68,9 +68,11 @@ type TokenManager struct {
// Config combines all available configuration parts.
type Config struct {
*shared.Commons
File string
Service Service
Log shared.Log
Log *shared.Log
Debug Debug
HTTP HTTP
GRPC GRPC
@@ -90,7 +92,6 @@ func New() *Config {
// DefaultConfig provides sane bootstrapping defaults.
func DefaultConfig() *Config {
return &Config{
Log: shared.Log{},
Service: Service{
Name: "settings",
DataPath: path.Join(defaults.BaseDataPath(), "settings"),
@@ -132,14 +133,3 @@ func DefaultConfig() *Config {
},
}
}
// GetEnv fetches a list of known env variables for this extension. It is to be used by gookit, as it provides a list
// with all the environment variables an extension supports.
func GetEnv() []string {
var r = make([]string, len(structMappings(&Config{})))
for i := range structMappings(&Config{}) {
r = append(r, structMappings(&Config{})[i].EnvVars...)
}
return r
}