MCPcopy
hub / github.com/jinzhu/configor / getPrefixForStruct

Function getPrefixForStruct

utils.go:208–213  ·  view source on GitHub ↗
(prefixes []string, fieldStruct *reflect.StructField)

Source from the content-addressed store, hash-verified

206}
207
208func getPrefixForStruct(prefixes []string, fieldStruct *reflect.StructField) []string {
209 if fieldStruct.Anonymous && fieldStruct.Tag.Get("anonymous") == "true" {
210 return prefixes
211 }
212 return append(prefixes, fieldStruct.Name)
213}
214
215func (configor *Configor) processDefaults(config interface{}) error {
216 configValue := reflect.Indirect(reflect.ValueOf(config))

Callers 1

processTagsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected