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/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
cache: false
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v8
with:
version: latest
args: --sort-results --disable unused
args: --disable unused

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build container
FROM --platform=${BUILDPLATFORM} golang:1.24 AS builder
FROM --platform=${BUILDPLATFORM} golang:1.25 AS builder
LABEL org.opencontainers.image.source=https://github.com/devcyclehq/sdk-proxy
LABEL org.opencontainers.image.description="DevCycle SDK Proxy"
LABEL org.opencontainers.image.licenses=MIT
Expand Down
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/devcyclehq/sdk-proxy/v2

go 1.24.0
go 1.25.0

Comment thread
jonathannorris marked this conversation as resolved.
require (
github.com/devcyclehq/go-server-sdk/v2 v2.23.0
Expand Down Expand Up @@ -41,10 +41,10 @@ require (
github.com/ugorji/go/codec v1.3.0 // indirect
go.uber.org/mock v0.5.2 // indirect
golang.org/x/arch v0.19.0 // indirect
golang.org/x/crypto v0.45.0 // indirect
golang.org/x/net v0.47.0 // indirect
golang.org/x/sys v0.38.0 // indirect
golang.org/x/text v0.31.0 // indirect
golang.org/x/crypto v0.54.0 // indirect
golang.org/x/net v0.57.0 // indirect
golang.org/x/sys v0.47.0 // indirect
golang.org/x/text v0.40.0 // indirect
google.golang.org/protobuf v1.36.6 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
16 changes: 8 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,15 @@ go.uber.org/mock v0.5.2 h1:LbtPTcP8A5k9WPXj54PPPbjcI4Y6lhyOZXn+VS7wNko=
go.uber.org/mock v0.5.2/go.mod h1:wLlUxC2vVTPTaE3UD51E0BGOAElKrILxhVSDYQLld5o=
golang.org/x/arch v0.19.0 h1:LmbDQUodHThXE+htjrnmVD73M//D9GTH6wFZjyDkjyU=
golang.org/x/arch v0.19.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk=
golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q=
golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4=
golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY=
golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
golang.org/x/crypto v0.54.0 h1:YLIA59K4fiNzHzjnZt2tUJQjQtUWfWbeHBqKtk3eScw=
golang.org/x/crypto v0.54.0/go.mod h1:KWL8ny2AZdGR2cWmzeHrp2azQPGogOv+HeQaVEXC2dk=
golang.org/x/net v0.57.0 h1:K5+3DljvIuDG9/Jv9rvyMywYNFCQ9RSUY6OOTTkT+tE=
golang.org/x/net v0.57.0/go.mod h1:KpXc8iv+r3XplLAG/f7Jsf9RPszJzdR0f58q9vGOuEU=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM=
golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM=
golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs=
golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
golang.org/x/text v0.40.0 h1:Ub2Z6/xjgF1WrYQz2nuITOEegKFtiIy+rieRJ5lHZKs=
golang.org/x/text v0.40.0/go.mod h1:hpnzDAfGV753zIKo+wk3u1bVKCGPbrnF7+7LBF/UHVY=
google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY=
google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
8 changes: 4 additions & 4 deletions http_endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func BatchEvents() gin.HandlerFunc {
c.JSON(http.StatusInternalServerError, gin.H{"message": "Error reading request body: " + err.Error()})
return
}
defer c.Request.Body.Close()
defer c.Request.Body.Close() //nolint:errcheck

var batchEvents map[string]interface{}
err = json.Unmarshal(body, &batchEvents)
Expand Down Expand Up @@ -174,7 +174,7 @@ func BatchEvents() gin.HandlerFunc {
c.JSON(http.StatusInternalServerError, gin.H{"message": "Error reading response: " + err.Error()})
return
}
defer resp.Body.Close()
defer resp.Body.Close() //nolint:errcheck
c.Data(resp.StatusCode, resp.Header.Get("Content-Type"), respBody)
}
}
Expand Down Expand Up @@ -292,7 +292,7 @@ func getUserFromBody(c *gin.Context) *devcycle.User {
})
return nil
}
defer c.Request.Body.Close()
defer c.Request.Body.Close() //nolint:errcheck
err = json.Unmarshal(jsonBody, &user)
if err != nil {
c.AbortWithStatusJSON(http.StatusBadRequest, gin.H{
Expand All @@ -316,7 +316,7 @@ func getEventFromBody(c *gin.Context) *devcycle.UserDataAndEventsBody {
})
return nil
}
defer c.Request.Body.Close()
defer c.Request.Body.Close() //nolint:errcheck

err = json.Unmarshal(jsonBody, &event)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions options.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func (i *ProxyInstance) BypassSDKConfig(version string) (config []byte, etag, la
}

body, err := io.ReadAll(resp.Body)
defer resp.Body.Close()
defer resp.Body.Close() //nolint:errcheck
if err != nil {
return i.bypassConfig, "", ""
}
Expand Down Expand Up @@ -230,7 +230,7 @@ func ParseConfig(configPath string) (*ProxyConfig, error) {
}
err = os.WriteFile(initialConfig.ConfigPath, sampleConfigData, 0644)
if err != nil {
return nil, fmt.Errorf("Failed to write sample config to file: %w", err)
return nil, fmt.Errorf("failed to write sample config to file: %w", err)
}
log.Fatal("Add your SDK key to the config file and run this command again.")
}
Expand Down
2 changes: 1 addition & 1 deletion options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ func TestParseConfig(t *testing.T) {
} else {
require.NoError(t, err)
if !assert.Equal(t, test.expected, actual) {
pretty.Println(test.name, actual)
_, _ = pretty.Println(test.name, actual)
}
}
})
Expand Down
Loading