mirror of
https://github.com/eosswedenorg/thalos
synced 2026-06-16 04:24:56 +02:00
app/config/config.go: rework api.
This commit is contained in:
parent
655dd730d7
commit
e5e15a7645
3 changed files with 25 additions and 25 deletions
|
|
@ -37,7 +37,7 @@ import (
|
|||
// Global variables
|
||||
// ---------------------------
|
||||
|
||||
var conf *config.Config
|
||||
var conf config.Config
|
||||
|
||||
var shClient *shipclient.Stream
|
||||
|
||||
|
|
@ -241,8 +241,8 @@ func serverCmd(ctx *cli.Context) error {
|
|||
}
|
||||
|
||||
// Parse config
|
||||
conf, err = config.Load(ctx.Path("config"))
|
||||
if err != nil {
|
||||
conf = config.New()
|
||||
if err = conf.ReadFile(ctx.Path("config")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue