Description
My own recent PR #3460 removed invalid error checking code (which used the errors package), but it did not remove the errors import.
import (
"strings"
"fmt"
"errors"
"net/url"
Post-mortem
The Go CI mechanism was bust at the time, so it wasn't caught there.
How this bug escaped me in local testing is mildly interesting. I was generating Go files into a particular directory as part of a project. However, I had the goimports tools set up (via a file watcher) to automatically run on modified Go files. Therefore goimports cleaned up the error before I ever saw it. This is a good argument for always testing in a clean Docker container before submitting a PR (this is required practice on my own corporate team).
Swagger-codegen version
master
Suggest a Fix
Remove the offending import.
Description
My own recent PR #3460 removed invalid error checking code (which used the
errorspackage), but it did not remove theerrorsimport.Post-mortem
The Go CI mechanism was bust at the time, so it wasn't caught there.
How this bug escaped me in local testing is mildly interesting. I was generating Go files into a particular directory as part of a project. However, I had the
goimportstools set up (via a file watcher) to automatically run on modified Go files. Thereforegoimportscleaned up the error before I ever saw it. This is a good argument for always testing in a clean Docker container before submitting a PR (this is required practice on my own corporate team).Swagger-codegen version
masterSuggest a Fix
Remove the offending import.