Getting a lint warning ineffectual assignment to "cfg"
at line cfg := &utils.Config{}
. Why is that ?
cfg := &utils.Config{}
env := os.Getenv("TEST")
if strings.EqualFold(env, "INT") {
cfg = utils.GetIntConfig()
} else {
cfg = utils.GetConfig()
}
cgw.Cgw(cfg)
ineffectual assignment to "cfg"
means that the assignment to cfg has no effect, as you unconditionaly overwrite it later.