I've searched Google and saw some samples, but it's just not clicking. I'm new to Go, so I hope someone can clarify this for me. I have the following code:
var configFile string
var keyLength int
var outKey string
var outconfig string
for index, item := range args {
if strings.ToLower(item) == "-config" {
configFile = args[index + 1]
}else if strings.ToLower(item) == "-keylength" {
keyLength, _ = strconv.Atoi(args[index + 1])
}else if strings.ToLower(item) == "-outkey" {
outKey = args[index + 1]
}else if strings.ToLower(item) == "-outconfig" {
outconfig = args[index + 1]
}
}
But I'm getting an error for all the variables where it's being defined with the following error "configFile declared but not used". If I can get some advice to help me better understand this problem