mirror of
https://github.com/chai2010/advanced-go-programming-book.git
synced 2025-05-24 12:32:21 +00:00
update dc
This commit is contained in:
parent
bb2b2c2c88
commit
c899770216
@ -122,6 +122,7 @@ func init() {
|
||||
log.Fatal(err)
|
||||
}
|
||||
kapi = client.NewKeysAPI(c)
|
||||
initConfig()
|
||||
}
|
||||
|
||||
func watchAndUpdate() {
|
||||
@ -143,7 +144,7 @@ func watchAndUpdate() {
|
||||
}()
|
||||
}
|
||||
|
||||
func getConfig() {
|
||||
func initConfig() {
|
||||
resp, err = kapi.Get(context.Background(), configPath, nil)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
@ -155,6 +156,10 @@ func getConfig() {
|
||||
}
|
||||
}
|
||||
|
||||
func getConfig() ConfigStruct {
|
||||
return appConfig
|
||||
}
|
||||
|
||||
func main() {
|
||||
// init your app
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user