Skip to content

Commit 0fd9590

Browse files
authored
Add modernize to golangci-lint, apply autofixes (#631)
1 parent 507d2c0 commit 0fd9590

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

.golangci.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ linters:
44
- dupword
55
- gocritic
66
- gosec
7+
- modernize
78
- nolintlint
89
- perfsprint
910
- prealloc

cmd/apps_rebuild.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ of apps. This command allows you to trigger a rebuild of a locally built app.
4545
})
4646

4747
if appsRebuildForce {
48-
request.SetBody(map[string]interface{}{
48+
request.SetBody(map[string]any{
4949
"force": true,
5050
})
5151
}

cmd/auth_reset.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ func getUsers() ([]User, error) {
3636
return nil, err
3737
}
3838

39-
for _, user := range data.Data["users"].([]interface{}) {
40-
user := user.(map[string]interface{})
39+
for _, user := range data.Data["users"].([]any) {
40+
user := user.(map[string]any)
4141
result = append(result, User{
4242
Username: user["username"].(string),
4343
Name: user["name"].(string),

spinner/character_sets.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var CharSets = map[int][]string{
2626
}
2727

2828
func init() {
29-
for i := rune(0); i < 12; i++ {
29+
for i := range rune(12) {
3030
CharSets[37] = append(CharSets[37], string([]rune{clockOneOClock + i}))
3131
CharSets[38] = append(CharSets[38], string([]rune{clockOneOClock + i}), string([]rune{clockOneThirty + i}))
3232
}

0 commit comments

Comments
 (0)