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:
+2
-2
@@ -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
@@ -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,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
@@ -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
@@ -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 {
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user