summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2024-03-26 16:07:41 +0700
committerShulhan <ms@kilabit.info>2024-03-26 16:07:41 +0700
commit7a0dbe1a568d0755afc4c1c432fa3ab9e09adff0 (patch)
treef0506e26d5185686439a9b86ccd122d5bc5fd2d9
parentbd4157bbd951d7207d5398006c98cebe483e459f (diff)
downloadgotp-7a0dbe1a568d0755afc4c1c432fa3ab9e09adff0.tar.xz
all: comply with linter recommendations
-rw-r--r--Makefile7
-rw-r--r--issuer.go4
2 files changed, 7 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index b0ee6f0..ee9b420 100644
--- a/Makefile
+++ b/Makefile
@@ -11,9 +11,14 @@ test:
.PHONY: lint
lint:
- -revive ./...
-fieldalignment ./...
-shadow ./...
+ -golangci-lint run \
+ --presets bugs,metalinter,performance,unused \
+ --disable exhaustive \
+ --disable musttag \
+ --disable bodyclose \
+ ./...
build:
mkdir -p _sys/usr/bin/
diff --git a/issuer.go b/issuer.go
index a151cd5..f4343ae 100644
--- a/issuer.go
+++ b/issuer.go
@@ -60,9 +60,7 @@ func NewIssuer(label, rawConfig string, rsaPrivateKey *rsa.PrivateKey) (issuer *
rawConfig = string(vbytes)
}
- var vals []string
-
- vals = strings.Split(rawConfig, valueSeparator)
+ var vals = strings.Split(rawConfig, valueSeparator)
if len(vals) < 2 {
return nil, fmt.Errorf(`%s: invalid value %q`, logp, rawConfig)
}