Golang forces us to manually remove unused items in the code, for example:
for index, item := range retorno.Threads {
fmt.Fprint(w, item.Id)
}
If you run a go run ....
it will say:
index declared and not used
And as a result will not run application. The same applies when using import
and does not use it in code, resulting in:
imported and not used: "(name)"
Well, I understand how to fix these types of errors, this is not the issue.
The question is many times I'm just testing something to see if it works, out of curiosity , a simple edition and that per table requires that I change other parts, for example removing a library that I ended up leaving to use.
Is there any way to ignore the error? Is there a way to automatically fix errors, such as remove unused libraries?