Skip to content

Commit d11dea4

Browse files
Fix lint
1 parent c6feeb6 commit d11dea4

3 files changed

Lines changed: 48 additions & 2 deletions

File tree

.golangci.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
version: "2"
2+
3+
run:
4+
tests: false
5+
6+
linters:
7+
settings:
8+
dupl:
9+
threshold: 100
10+
11+
gomoddirectives:
12+
replace-allow-list:
13+
- github.com/linode/linodego
14+
15+
govet:
16+
disable:
17+
- shadow
18+
19+
revive:
20+
rules:
21+
- name: unused-parameter
22+
severity: warning
23+
disabled: true
24+
25+
staticcheck:
26+
checks: ["all", "-ST1005"]
27+
28+
exclusions:
29+
generated: lax
30+
presets:
31+
- comments
32+
- common-false-positives
33+
- legacy
34+
- std-error-handling
35+
paths:
36+
- third_party$
37+
- builtin$
38+
- examples$
39+
40+
formatters:
41+
exclusions:
42+
generated: lax
43+
paths:
44+
- third_party$
45+
- builtin$
46+
- examples$

fs_utils_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func GetFSType(device string) string {
4646
for _, v := range strings.Split(string(out), " ") {
4747
if strings.Contains(v, "TYPE=") {
4848
fsType = strings.Split(v, "=")[1]
49-
fsType = strings.Replace(fsType, "\"", "", -1)
49+
fsType = strings.ReplaceAll(fsType, "\"", "")
5050
}
5151
}
5252
}

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func getEnv(name string) (string, bool) {
7979
}
8080

8181
name = strings.ToUpper(name)
82-
name = strings.Replace(name, "-", "_", -1)
82+
name = strings.ReplaceAll(name, "-", "_")
8383

8484
if val, found := os.LookupEnv(name); found {
8585
return val, true

0 commit comments

Comments
 (0)