Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for newCfgKVS (0.07 sec)

  1. internal/config/config.go

    func Merge(cfgKVS map[string]KVS, envname string, defaultKVS KVS) map[string]KVS {
    	newCfgKVS := make(map[string]KVS)
    	for _, e := range env.List(envname) {
    		tgt := strings.TrimPrefix(e, envname+Default)
    		if tgt == envname {
    			tgt = Default
    		}
    		newCfgKVS[tgt] = defaultKVS
    	}
    	for tgt, kv := range cfgKVS {
    		newCfgKVS[tgt] = kv
    	}
    	return newCfgKVS
    }
    
    // Set sets a value, if not sets a default value.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Sep 03 18:23:41 UTC 2024
    - 37.7K bytes
    - Viewed (0)
Back to top