chore(lint): fix issues

- sources/env: remove unused `envToInt`
- fix `ireturn` error for `newCipherDESCBCBlock`
This commit is contained in:
Quentin McGaw
2023-04-22 08:13:09 +00:00
parent 9d4105ee59
commit 1693c59e0d
3 changed files with 5 additions and 9 deletions

View File

@@ -29,6 +29,10 @@ issues:
- text: "returns interface \\(github\\.com\\/vishvananda\\/netlink\\.Link\\)"
linters:
- ireturn
- path: "internal\\/openvpn\\/pkcs8\\/descbc\\.go"
text: "newCipherDESCBCBlock returns interface \\(github\\.com\\/youmark\\/pkcs8\\.Cipher\\)"
linters:
- ireturn
linters:
enable:

View File

@@ -29,14 +29,6 @@ func envToCSV(envKey string) (values []string) {
return lowerAndSplit(csv)
}
func envToInt(envKey string) (n int, err error) {
s := getCleanedEnv(envKey)
if s == "" {
return 0, nil
}
return strconv.Atoi(s)
}
func envToFloat64(envKey string) (f float64, err error) {
s := getCleanedEnv(envKey)
if s == "" {

View File

@@ -14,7 +14,7 @@ func init() { //nolint:gochecknoinits
pkcs8lib.RegisterCipher(oidDESCBC, newCipherDESCBCBlock)
}
func newCipherDESCBCBlock() pkcs8lib.Cipher { //nolint:ireturn
func newCipherDESCBCBlock() pkcs8lib.Cipher {
return cipherDESCBC{}
}