feat(deps)!: upgrade to Go 1.17 and golanci-lint 1.64 (#5)

Upgrade to Go 1.17 and golangci-lint to 1.64, and fix the linting issues
that were found.

Also upgrade CI workflow actions to latest versions, and setup a test
matrix for relevant Go versions.

BREAKING CHANGE: Minimum Go version changed from 1.15 to 1.17.
This commit is contained in:
2025-02-28 00:42:28 +00:00
committed by GitHub
parent 8da5e1ef80
commit 16bd3ea3b9
8 changed files with 77 additions and 117 deletions

View File

@@ -171,12 +171,12 @@ func UnicodeString(n int, alphabet []rune) (string, error) {
//
// In summary, the generated random string will:
//
// - be between 1 and 63 characters in length, other n values returns a error
// - first character will be one of a-z
// - last character will be one of a-z or 0-9
// - in-between first and last characters consist of a-z, 0-9, or "-"
// - potentially contain two or more consecutive "-", except the 3rd and 4th
// characters, as that would violate RFC 5891, section 4.2.3.1.
// - be between 1 and 63 characters in length, other n values returns a error
// - first character will be one of a-z
// - last character will be one of a-z or 0-9
// - in-between first and last characters consist of a-z, 0-9, or "-"
// - potentially contain two or more consecutive "-", except the 3rd and 4th
// characters, as that would violate RFC 5891, section 4.2.3.1.
func DNSLabel(n int) (string, error) {
switch {
case n < 1 || n > 63: