Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mxssl committed Oct 26, 2024
1 parent 57be8cb commit 5cb62bd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/mxssl/ntwrk

go 1.22
go 1.23

require (
github.com/joho/godotenv v1.5.1
Expand Down
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func main() {

http.HandleFunc("/", rootHandler)

port := fmt.Sprintf(":" + port)
port := fmt.Sprintf(":%s", port)

server := http.Server{Addr: port}

Expand Down Expand Up @@ -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),
Expand All @@ -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,
Expand Down

0 comments on commit 5cb62bd

Please sign in to comment.