Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.22.4
go-version: 1.24.2

- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@2023.1.7
run: go install honnef.co/go/tools/cmd/staticcheck@2025.1.1

- name: Run makefile
run: make all
4 changes: 2 additions & 2 deletions gateway/load_balancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ func (lb *roundRobinLoadBalancer) roundTrip(req *http.Request) (*http.Response,

if len(lb.ips) == 0 {
errMsg := fmt.Sprintln("no IP addresses available")
logrus.Errorf(errMsg)
return nil, fmt.Errorf(errMsg)
logrus.Errorf("%s", errMsg)
return nil, fmt.Errorf("%s", errMsg)
}

ip := lb.getNextIP()
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/cortexproject/auth-gateway

go 1.22.4
go 1.24.0

require (
github.com/google/go-github/v53 v53.2.0
Expand Down
4 changes: 2 additions & 2 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,11 +318,11 @@ func checkPortAvailable(addr string, port int, network string) bool {
func checkPort(addr string, port int, defaultPort int, network string) (int, error) {
p := port
if port == 0 {
logrus.Info(fmt.Sprintf("port not specified, trying default port %d", defaultPort))
logrus.Infof("port not specified, trying default port %d", defaultPort)
if checkPortAvailable(addr, defaultPort, network) {
p = defaultPort
} else {
return 0, fmt.Errorf(fmt.Sprintf("port %d is not available, please specify a port", defaultPort))
return 0, fmt.Errorf("port %d is not available, please specify a port", defaultPort)
}
}
return p, nil
Expand Down