Skip to content

Commit 1c80151

Browse files
committed
Fix more problems, update golangci-lint
1 parent 63052c1 commit 1c80151

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ repos:
2626
- id: fix-byte-order-marker
2727

2828
- repo: https://github.com/golangci/golangci-lint
29-
rev: v1.55.2
29+
rev: v1.56.1
3030
hooks:
3131
- id: golangci-lint-full
3232

exporter.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func parseUnixSocketAddress(address string) (string, string, error) {
6767
addressPartsLength := len(addressParts)
6868

6969
if addressPartsLength > 3 || addressPartsLength < 1 {
70-
return "", "", fmt.Errorf("address for unix domain socket has wrong format")
70+
return "", "", errors.New("address for unix domain socket has wrong format")
7171
}
7272

7373
unixSocketPath := addressParts[1]
@@ -103,7 +103,7 @@ func main() {
103103
// convert deprecated flags to new format
104104
for i, arg := range os.Args {
105105
if strings.HasPrefix(arg, "-") && !strings.HasPrefix(arg, "--") && len(arg) > 2 {
106-
newArg := fmt.Sprintf("-%s", arg)
106+
newArg := "-" + arg
107107
fmt.Printf("the flag format is deprecated and will be removed in a future release, please use the new format: %s\n", newArg)
108108
os.Args[i] = newArg
109109
}

0 commit comments

Comments
 (0)