// A ParseError occurs when an environment variable cannot be converted to
// the type required by a struct field during assignment.
typeParseErrorstruct{
KeyNamestring
FieldNamestring
TypeNamestring
Valuestring
Errerror
}
// Decoder has the same semantics as Setter, but takes higher precedence.
// It is provided for historical compatibility.
typeDecoderinterface{
Decode(valuestring)error
}
// Setter is implemented by types can self-deserialize values.
// Any type that implements flag.Value also implements Setter.
typeSetterinterface{
Set(valuestring)error
}
func(e*ParseError)Error()string{
returnfmt.Sprintf("envconfig.Process: assigning %[1]s to %[2]s: converting '%[3]s' to type %[4]s. details: %[5]s",e.KeyName,e.FieldName,e.Value,e.TypeName,e.Err)
}
// varInfo maintains information about the configuration variable
typevarInfostruct{
Namestring
Altstring
Keystring
Fieldreflect.Value
Tagsreflect.StructTag
}
// GatherInfo gathers information about the specified struct