chore(example): 更新示例配置参数与键名
This commit is contained in:
@@ -13,8 +13,8 @@ func main() {
|
|||||||
// create config
|
// create config
|
||||||
cfg := &client.Config{
|
cfg := &client.Config{
|
||||||
BaseURL: "http://localhost:8080",
|
BaseURL: "http://localhost:8080",
|
||||||
AppName: "myapp",
|
AppName: "kenaito-springboot-demo",
|
||||||
Env: "dev",
|
Env: "daily",
|
||||||
Version: "latest",
|
Version: "latest",
|
||||||
SyncInterval: 30, // sync every 30 seconds
|
SyncInterval: 30, // sync every 30 seconds
|
||||||
CacheDir: ".",
|
CacheDir: ".",
|
||||||
@@ -44,8 +44,8 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// get specific config
|
// get specific config
|
||||||
dbHost := c.Get("db.host")
|
dbHost := c.Get("database.host")
|
||||||
fmt.Printf("\ndb.host = %s\n", dbHost)
|
fmt.Printf("\ndatabase.host = %s\n", dbHost)
|
||||||
|
|
||||||
// keep running until signal
|
// keep running until signal
|
||||||
fmt.Println("\nListening for config changes... (press Ctrl+C to stop)")
|
fmt.Println("\nListening for config changes... (press Ctrl+C to stop)")
|
||||||
|
|||||||
Reference in New Issue
Block a user