Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
nehzata committed Oct 4, 2023
1 parent da0a674 commit c538127
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions cmd/export-fundables/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ func run(
defer f.Close()

w := csv.NewWriter(f)
w.Write([]string{"name", "isIncluded", "isOnTd", "repos", "entities"})
w.WriteAll(records)
_ = w.Write([]string{"name", "isIncluded", "isOnTd", "repos", "entities"})
_ = w.WriteAll(records)

return nil
}
Expand Down
6 changes: 2 additions & 4 deletions commands/animate-repos/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func (c *CmdAnimateRepos) Run(
}

if depCursor != nil {
dc := sql.NullString{*depCursor, true}
dc := sql.NullString{String: *depCursor, Valid: true}

/* autoquery name: RepoUpdateCursorDep :exec
Expand All @@ -155,7 +155,7 @@ func (c *CmdAnimateRepos) Run(
CursorDep: dc,
})
} else if manifetsCursor != nil {
mc := sql.NullString{*manifetsCursor, true}
mc := sql.NullString{String: *manifetsCursor, Valid: true}

/* autoquery name: RepoUpdateCursorManifest :exec
Expand All @@ -181,6 +181,4 @@ func (c *CmdAnimateRepos) Run(
})
}
}

return nil
}
4 changes: 2 additions & 2 deletions utils/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func flatten(config map[string]interface{}) map[string]interface{} {
switch v := v.(type) {
case map[string]interface{}:
for k2, v2 := range flatten(v) {
flat[camelCase(k)+strings.Title(camelCase(k2))] = v2
flat[camelCase(k)+strings.Title(camelCase(k2))] = v2 // nolint:staticcheck
}
default:
flat[k] = v
Expand All @@ -43,6 +43,6 @@ func flatten(config map[string]interface{}) map[string]interface{} {
}

func camelCase(s string) string {
out := strings.ReplaceAll(strings.Title(strings.ReplaceAll(s, "-", " ")), " ", "")
out := strings.ReplaceAll(strings.Title(strings.ReplaceAll(s, "-", " ")), " ", "") // nolint:staticcheck
return strings.ToLower(out[:1]) + out[1:]
}

0 comments on commit c538127

Please sign in to comment.