mirror of
https://github.com/eosswedenorg/thalos
synced 2026-06-20 09:56:47 +02:00
nternal/config/cli.go: move overrideCliFlags() to cmd/thalos/server.go as its pretty specific code.
This commit is contained in:
parent
53baae8a7f
commit
7f1f186aa0
4 changed files with 15 additions and 24 deletions
|
|
@ -1,7 +1,6 @@
|
|||
package config
|
||||
|
||||
import (
|
||||
"path"
|
||||
"time"
|
||||
|
||||
shipclient "github.com/eosswedenorg-go/antelope-ship-client"
|
||||
|
|
@ -45,12 +44,3 @@ func GetFlags() *pflag.FlagSet {
|
|||
|
||||
return &flags
|
||||
}
|
||||
|
||||
func overrideCliFlags(cfg *Config, flags *pflag.FlagSet) error {
|
||||
logFile, _ := flags.GetString("log")
|
||||
if len(logFile) > 0 {
|
||||
cfg.Log.Directory = path.Dir(logFile)
|
||||
cfg.Log.Filename = path.Base(logFile)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue