Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
davidnewhall committed Jul 16, 2024
1 parent 7029100 commit c276bb7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions init/config/conf-builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ func (h *Header) makeSection(name section, showHeader, showValue bool) string {

if !h.NoHeader { // Print the [section] or [[section]] header.
space = " "

if h.Kind == list { // list sections are commented by default.
buf.WriteString(comment + "[[" + string(name) + "]]" + "\n") // list sections use double-brackets.
} else {
Expand Down
4 changes: 2 additions & 2 deletions init/config/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func main() {
config := &Config{}
// Decode conf-builder file into Go data structure.
if err = yaml.NewDecoder(file).Decode(config); err != nil {
log.Fatalln(err)
log.Fatalln(err) //nolint:gocritic
}

for _, builder := range flags.Type {
Expand Down Expand Up @@ -129,7 +129,7 @@ func openFile(fileName string) (io.ReadCloser, error) {
if strings.HasPrefix(fileName, "http") {
http.DefaultClient.Timeout = opTimeout

resp, err := http.Get(fileName) //nolint:noctx // because we set a timeout.
resp, err := http.Get(fileName) //nolint:noctx,gosec // because we set a timeout.
if err != nil {
return nil, fmt.Errorf("%s: %w", fileName, err)
}
Expand Down

0 comments on commit c276bb7

Please sign in to comment.