You've already forked speedtest-go
Let Viper handle the config file
This commit is contained in:
@@ -17,14 +17,7 @@ var (
|
||||
|
||||
func main() {
|
||||
flag.Parse()
|
||||
|
||||
var conf config.Config
|
||||
if *optConfig != "" {
|
||||
conf = config.LoadFile(*optConfig)
|
||||
} else {
|
||||
conf = config.Load()
|
||||
}
|
||||
|
||||
conf := config.Load(*optConfig)
|
||||
web.SetServerLocation(&conf)
|
||||
results.Initialize(&conf)
|
||||
database.SetDBInfo(&conf)
|
||||
|
||||
Reference in New Issue
Block a user