Skip to content

Instantly share code, notes, and snippets.

@aavrug
Created July 13, 2020 18:34
Show Gist options
  • Save aavrug/423de0d90ae05a1014c1c2caa97ef83c to your computer and use it in GitHub Desktop.
Save aavrug/423de0d90ae05a1014c1c2caa97ef83c to your computer and use it in GitHub Desktop.
package main
import (
"log"
cfg "./config"
)
var configfile = flag.String("config", "config.json", "config file path")
func main() {
if err := cfg.LoadConfig(*configfile); err != nil {
log.Print("load condig file failed : ", err.Error())
return
}
log.Print("start init default server", cfg.GetConfig())
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment