package envconf type dataTypeInfo struct { parser func(string, string) cValue name string } var tInfo map[DataType]dataTypeInfo func init() { tInfo = make(map[DataType]dataTypeInfo) var intInfo dataTypeInfo var metricInfo dataTypeInfo var durInfo dataTypeInfo var strInfo dataTypeInfo var dirInfo dataTypeInfo var hexInfo dataTypeInfo var hexInfo16 dataTypeInfo var hexInfo32 dataTypeInfo var hexInfo64 dataTypeInfo var hexInfo128 dataTypeInfo var boolInfo dataTypeInfo intInfo.name = "int" metricInfo.name = "metric" durInfo.name = "duration" dirInfo.name = "directory" strInfo.name = "string" hexInfo.name = "hex" boolInfo.name = "bool" intInfo.parser = parseInt metricInfo.parser = parseMetric durInfo.parser = parseDuration dirInfo.parser = parseDirectory strInfo.parser = parseString hexInfo.parser = parseHex hexInfo16.parser = parseHex16 hexInfo32.parser = parseHex32 hexInfo64.parser = parseHex64 hexInfo128.parser = parseHex128 boolInfo.parser = parseBool tInfo[TypeInt] = intInfo tInfo[TypeMetric] = metricInfo tInfo[TypeDuration] = durInfo tInfo[TypeString] = strInfo tInfo[TypeDirectory] = dirInfo tInfo[TypeHex] = hexInfo tInfo[TypeHex16] = hexInfo16 tInfo[TypeHex32] = hexInfo32 tInfo[TypeHex64] = hexInfo64 tInfo[TypeHex128] = hexInfo128 tInfo[TypeBool] = boolInfo }