Skip to content

Commit

Permalink
refactor: replit sample
Browse files Browse the repository at this point in the history
  • Loading branch information
hui.wang committed Jan 10, 2022
1 parent b5d03eb commit bcbbd14
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/replit/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@ func main() {
fmt.Println(config.AtomicConfig().GetRedis().GetTimeoutsStruct().ReadTimeout) // 1s
fmt.Println(config.AtomicConfig().GetRedis().GetTimeoutsStruct().WriteTimeout) // 2m0s

fmt.Println(config.AtomicConfig().GetTypeMapStringInt()) // map[test_env_host_127.0.0.1:1]
fmt.Println(config.AtomicConfig().GetTypeMapStringIntNotLeaf()) // map[a:1 b:2]
panicErr(xconf.UpdateWithFieldPathValues("type_map_string_int", "aaaaa,11111"))
panicErr(xconf.UpdateWithFieldPathValues("type_map_string_int_not_leaf", "aaaaa,11111"))
fmt.Println(config.AtomicConfig().GetTypeMapStringInt())
fmt.Println(config.AtomicConfig().GetTypeMapStringIntNotLeaf())
fmt.Println(config.AtomicConfig().GetTypeMapStringInt()) // map[aaaaa:11111]
fmt.Println(config.AtomicConfig().GetTypeMapStringIntNotLeaf()) // map[a:1 aaaaa:11111 b:2]

empteOne := &config.Config{ETCD: &config.ETCD{}, Redis: &config.Redis{}}
x1 := xconf.NewWithoutFlagEnv(xconf.WithReaders(bytes.NewBuffer(bb)))
Expand Down

0 comments on commit bcbbd14

Please sign in to comment.