wip: config
This commit is contained in:
+3
-3
@@ -19,10 +19,9 @@ const (
|
||||
|
||||
type Config struct {
|
||||
servicePaths []string
|
||||
cron []*cron
|
||||
}
|
||||
|
||||
type cron struct{}
|
||||
|
||||
func Read() (*Config, error) {
|
||||
viper.SetEnvPrefix(EnvPrefix)
|
||||
viper.BindEnv(EnvConfigPath)
|
||||
@@ -34,7 +33,7 @@ func Read() (*Config, error) {
|
||||
svcdir string
|
||||
serviceAvailable bool
|
||||
cronAvailable bool
|
||||
cron []cron
|
||||
cron []*cron
|
||||
crontabfile string
|
||||
)
|
||||
|
||||
@@ -61,6 +60,7 @@ func Read() (*Config, error) {
|
||||
crontabfile = filepath.Join(configPath, CrontabFileName)
|
||||
cron, err = readCrontab(crontabfile)
|
||||
if len(cron) > 0 {
|
||||
outConfig.cron = cron
|
||||
cronAvailable = true
|
||||
}
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user