add 5 dimensional map
This commit is contained in:
parent
62ff297952
commit
9badf9a54a
100
envconf.go
100
envconf.go
@ -783,6 +783,106 @@ func (c *Config) GetMapMapMapMapHex(key string) (retval map[string]map[string]ma
|
||||
return
|
||||
}
|
||||
|
||||
func (c *Config) GetMapMapMapMapMapInt(key string) (retval map[string]map[string]map[string]map[string]map[string]int64) {
|
||||
retval = make(map[string]map[string]map[string]map[string]map[string]int64)
|
||||
for k1, v1 := range c.getRawMapMapMapMapMap(key, TypeInt) {
|
||||
retval[k1] = make(map[string]map[string]map[string]map[string]int64)
|
||||
for k2, v2 := range v1 {
|
||||
retval[k1][k2] = make(map[string]map[string]map[string]int64)
|
||||
for k3, v3 := range v2 {
|
||||
retval[k1][k2][k3] = make(map[string]map[string]int64)
|
||||
for k4, v4 := range v3 {
|
||||
retval[k1][k2][k3][k4] = make(map[string]int64)
|
||||
for k5, v5 := range v4 {
|
||||
retval[k1][k2][k3][k4][k5] = v5.intval
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (c *Config) GetMapMapMapMapMapDuration(key string) (retval map[string]map[string]map[string]map[string]map[string]time.Duration) {
|
||||
retval = make(map[string]map[string]map[string]map[string]map[string]time.Duration)
|
||||
for k1, v1 := range c.getRawMapMapMapMapMap(key, TypeDuration) {
|
||||
retval[k1] = make(map[string]map[string]map[string]map[string]time.Duration)
|
||||
for k2, v2 := range v1 {
|
||||
retval[k1][k2] = make(map[string]map[string]map[string]time.Duration)
|
||||
for k3, v3 := range v2 {
|
||||
retval[k1][k2][k3] = make(map[string]map[string]time.Duration)
|
||||
for k4, v4 := range v3 {
|
||||
retval[k1][k2][k3][k4] = make(map[string]time.Duration)
|
||||
for k5, v5 := range v4 {
|
||||
retval[k1][k2][k3][k4][k5] = v5.durval
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (c *Config) GetMapMapMapMapMapString(key string) (retval map[string]map[string]map[string]map[string]map[string]string) {
|
||||
retval = make(map[string]map[string]map[string]map[string]map[string]string)
|
||||
for k1, v1 := range c.getRawMapMapMapMapMap(key, TypeString) {
|
||||
retval[k1] = make(map[string]map[string]map[string]map[string]string)
|
||||
for k2, v2 := range v1 {
|
||||
retval[k1][k2] = make(map[string]map[string]map[string]string)
|
||||
for k3, v3 := range v2 {
|
||||
retval[k1][k2][k3] = make(map[string]map[string]string)
|
||||
for k4, v4 := range v3 {
|
||||
retval[k1][k2][k3][k4] = make(map[string]string)
|
||||
for k5, v5 := range v4 {
|
||||
retval[k1][k2][k3][k4][k5] = v5.strval
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (c *Config) GetMapMapMapMapMapBool(key string) (retval map[string]map[string]map[string]map[string]map[string]bool) {
|
||||
retval = make(map[string]map[string]map[string]map[string]map[string]bool)
|
||||
for k1, v1 := range c.getRawMapMapMapMapMap(key, TypeBool) {
|
||||
retval[k1] = make(map[string]map[string]map[string]map[string]bool)
|
||||
for k2, v2 := range v1 {
|
||||
retval[k1][k2] = make(map[string]map[string]map[string]bool)
|
||||
for k3, v3 := range v2 {
|
||||
retval[k1][k2][k3] = make(map[string]map[string]bool)
|
||||
for k4, v4 := range v3 {
|
||||
retval[k1][k2][k3][k4] = make(map[string]bool)
|
||||
for k5, v5 := range v4 {
|
||||
retval[k1][k2][k3][k4][k5] = v5.boolval
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (c *Config) GetMapMapMapMapMapHex(key string) (retval map[string]map[string]map[string]map[string]map[string][]byte) {
|
||||
retval = make(map[string]map[string]map[string]map[string]map[string][]byte)
|
||||
for k1, v1 := range c.getRawMapMapMapMapMap(key, TypeHex) {
|
||||
retval[k1] = make(map[string]map[string]map[string]map[string][]byte)
|
||||
for k2, v2 := range v1 {
|
||||
retval[k1][k2] = make(map[string]map[string]map[string][]byte)
|
||||
for k3, v3 := range v2 {
|
||||
retval[k1][k2][k3] = make(map[string]map[string][]byte)
|
||||
for k4, v4 := range v3 {
|
||||
retval[k1][k2][k3][k4] = make(map[string][]byte)
|
||||
for k5, v5 := range v4 {
|
||||
retval[k1][k2][k3][k4][k5] = v5.binval
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func getFirstRune(str string) rune {
|
||||
for _, v := range str {
|
||||
return v
|
||||
|
Loading…
Reference in New Issue
Block a user