package main
import (
"fmt"
"github.com/cheivin/di/van"
)
func main() {
store := van.New()
store.SetDefault("a.b.c", "abc")
store.SetDefault("a.b.d", "d")
store.Set("a.b.c", "override")
store.Set("a.b.e", "e")
store.Set("a.b", map[string]interface{}{
"x": 1,
"y": 2,
"z": map[string]interface{}{
"n": 3,
},
})
store.Set("a.b.z.m", 4)
fmt.Println(store.Get("a.b.c")) // override
fmt.Println(store.Get("a.b.d")) // d
fmt.Println(store.Get("a.b.e")) // e
fmt.Println(store.Get("a.b.x")) // 1
fmt.Println(store.Get("a.b.z.n")) // 3
}