Skip to content

Commit

Permalink
lintcmd: don't accidentally shadow variable in type assertion
Browse files Browse the repository at this point in the history
(cherry picked from commit 5be6941)
  • Loading branch information
dominikh committed Apr 9, 2022
1 parent 1adb261 commit ec23881
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lintcmd/cmd.go
Expand Up @@ -393,8 +393,8 @@ func (cmd *Command) Run() {
var err error
bconfs, err = parseBuildConfigs(os.Stdin)
if err != nil {
if err, ok := err.(parseBuildConfigError); ok {
fmt.Fprintf(os.Stderr, "<stdin>:%d couldn't parse build matrix: %s\n", err.line, err.err)
if perr, ok := err.(parseBuildConfigError); ok {
fmt.Fprintf(os.Stderr, "<stdin>:%d couldn't parse build matrix: %s\n", perr.line, perr.err)
} else {
fmt.Fprintln(os.Stderr, err)
}
Expand Down

0 comments on commit ec23881

Please sign in to comment.