diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c73d3f6..1dce5e2 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,6 +13,6 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: '1.22' + go-version: '1.23' - uses: golangci/golangci-lint-action@v6 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8663b3a..c432322 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: '1.22' + go-version: '1.23' - name: Run GoReleaser uses: goreleaser/goreleaser-action@v6 with: diff --git a/go.mod b/go.mod index 0e53f0a..5483a51 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/mxssl/ntwrk -go 1.22 +go 1.23 require ( github.com/joho/godotenv v1.5.1 diff --git a/main.go b/main.go index 1e22553..6ced26f 100644 --- a/main.go +++ b/main.go @@ -50,7 +50,7 @@ func main() { http.HandleFunc("/", rootHandler) - port := fmt.Sprintf(":" + port) + port := fmt.Sprintf(":%s", port) server := http.Server{Addr: port} @@ -88,7 +88,7 @@ func rootHandler(w http.ResponseWriter, r *http.Request) { if mode == modeNative { for _, ip := range re.FindStringSubmatch(r.RemoteAddr)[1:] { if ip != "" { - fmt.Fprintf(w, ip+"\n") + fmt.Fprintf(w, "%s\n", ip) slog.Info( "request", slog.String("source", ip), @@ -98,7 +98,7 @@ func rootHandler(w http.ResponseWriter, r *http.Request) { } if mode == modeCloudflare { ip := r.Header.Get("CF-Connecting-IP") - fmt.Fprintf(w, ip+"\n") + fmt.Fprintf(w, "%s\n", ip) slog.Info( "request", "ip", ip,