Skip to content

Commit

Permalink
refactor(kit/feature/_codegen): simplify with fmt.Errorf
Browse files Browse the repository at this point in the history
  • Loading branch information
gavincabbage committed Apr 28, 2020
1 parent 56a1949 commit 1ac0307
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions kit/feature/_codegen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package main

import (
"bytes"
"errors"
"flag"
"fmt"
"go/format"
Expand Down Expand Up @@ -82,7 +81,7 @@ func (f flagConfig) Valid() error {
}
}
// e.g. "my flag: missing key; missing default"
return errors.New(fmt.Sprintf("%s: %s\n", name, strings.Join(problems, "; ")))
return fmt.Errorf("%s: %s\n", name, strings.Join(problems, "; "))
}
return nil
}
Expand Down

0 comments on commit 1ac0307

Please sign in to comment.