0
0
mirror of https://github.com/thegeeklab/wp-plugin-go.git synced 2024-06-02 18:39:40 +02:00

ci: fix golangci-lint deprecations

This commit is contained in:
Robert Kaussow 2024-05-12 11:08:23 +02:00
parent 5e6b213c13
commit 085ee0d15a
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
3 changed files with 5 additions and 6 deletions

View File

@ -23,7 +23,6 @@ linters:
- errchkjson
- errname
- errorlint
- execinquery
- exhaustive
- exportloopref
- forcetypeassert
@ -37,12 +36,12 @@ linters:
- gocyclo
- godot
# - godox
- goerr113
- err113
- gofmt
- gofumpt
- goheader
- goimports
- gomnd
- mnd
- gomoddirectives
- gomodguard
- goprintffuncname

View File

@ -238,11 +238,11 @@ func prevFromContext(c *cli.Context) Commit {
// line as the title, and the rest as the description. If there is no newline,
// the entire message is returned as the title, and the description is empty.
func splitMessage(message string) (string, string) {
//nolint:gomnd
//nolint:mnd
switch parts := strings.SplitN(message, "\n", 2); len(parts) {
case 1:
return parts[0], ""
//nolint:gomnd
//nolint:mnd
case 2:
return parts[0], parts[1]
}

View File

@ -28,7 +28,7 @@ func splitWithEscaping(in, separator, escapeString string) []string {
out := strings.Split(in, separator)
//nolint:gomnd
//nolint:mnd
for i := len(out) - 2; i >= 0; i-- {
if strings.HasSuffix(out[i], escapeString) {
out[i] = out[i][:len(out[i])-len(escapeString)] + separator + out[i+1]