mirror of
https://github.com/thegeeklab/wp-plugin-go.git
synced 2024-11-23 06:40:40 +00:00
ci: fix golangci-lint deprecations
This commit is contained in:
parent
5e6b213c13
commit
085ee0d15a
@ -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
|
||||
|
@ -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]
|
||||
}
|
||||
|
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user