Refactoring (#327)

* chore: enable more linters and fix linter issues

* ci: enable linter checks on all branches and disable recurring checks

recurring linter checks don't make that much sense. The code & linter checks should not change on their own over night ;)

* chore: update packages

* Revert "chore: update packages"

This reverts commit 30250bf28c4b39e9e5b3af012a4e28ab036bf9af.

* chore: manually upgrade some packages
This commit is contained in:
Florian Ritterhoff
2023-03-07 01:49:06 +02:00
committed by GitHub
parent 1c4e1e55e4
commit 34344b1b35
22 changed files with 164 additions and 90 deletions
+2 -2
View File
@@ -102,7 +102,7 @@ func TestApiRegister(t *testing.T) {
NotContainsKey("error")
allowfrom := map[string][]interface{}{
"allowfrom": []interface{}{"123.123.123.123/32",
"allowfrom": {"123.123.123.123/32",
"2001:db8:a0b:12f0::1/32",
"[::1]/64",
},
@@ -140,7 +140,7 @@ func TestApiRegisterBadAllowFrom(t *testing.T) {
for _, v := range invalidVals {
allowfrom := map[string][]interface{}{
"allowfrom": []interface{}{v}}
"allowfrom": {v}}
response := e.POST("/register").
WithJSON(allowfrom).
+2 -1
View File
@@ -4,11 +4,12 @@ import (
"context"
"encoding/json"
"fmt"
"github.com/acme-dns/acme-dns/pkg/acmedns"
"net"
"net/http"
"github.com/julienschmidt/httprouter"
"github.com/acme-dns/acme-dns/pkg/acmedns"
)
type key int
+2 -1
View File
@@ -2,9 +2,10 @@ package api
import (
"context"
"github.com/acme-dns/acme-dns/pkg/acmedns"
"github.com/mholt/acmez/acme"
"github.com/acme-dns/acme-dns/pkg/acmedns"
)
// ChallengeProvider implements go-acme/lego Provider interface which is used for ACME DNS challenge handling
+2 -1
View File
@@ -6,8 +6,9 @@ import (
"io"
"net/http"
"github.com/acme-dns/acme-dns/pkg/acmedns"
"github.com/julienschmidt/httprouter"
"github.com/acme-dns/acme-dns/pkg/acmedns"
)
// RegResponse is a struct for registration response JSON
+4 -2
View File
@@ -2,11 +2,13 @@ package api
import (
"fmt"
"github.com/acme-dns/acme-dns/pkg/acmedns"
"github.com/google/uuid"
"regexp"
"strings"
"unicode/utf8"
"github.com/google/uuid"
"github.com/acme-dns/acme-dns/pkg/acmedns"
)
func jsonError(message string) []byte {
+2 -1
View File
@@ -1,9 +1,10 @@
package api
import (
"github.com/acme-dns/acme-dns/pkg/acmedns"
"testing"
"github.com/acme-dns/acme-dns/pkg/acmedns"
"github.com/google/uuid"
)