Skip to content

Commit

Permalink
use go 1.16 compatible api
Browse files Browse the repository at this point in the history
  • Loading branch information
kenny-statsig committed Dec 6, 2022
1 parent efa81ae commit 1be8eb8
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.16
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/kong.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: "^1.16"
go-version: "1.16"

- name: Get KONG
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.16'
go-version: '1.16'
- run: go test -v -race
env:
test_api_key: ${{ secrets.SDK_CONSISTENCY_TEST_COMPANY_API_KEY }}
2 changes: 1 addition & 1 deletion evaluation_details.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ func newEvaluationDetails(
reason: reason,
configSyncTime: configSyncTime,
initTime: initTime,
serverTime: now().UnixMilli(),
serverTime: now().Unix() * 1000,
}
}
2 changes: 1 addition & 1 deletion evaluation_details_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func TestEvaluationDetails(t *testing.T) {
var mockedServerTime int64
doMock := func() {
now = func() time.Time { return time.Date(2022, 12, 12, 0, 0, 0, 0, time.Local) }
mockedServerTime = now().UnixMilli()
mockedServerTime = now().Unix() * 1000
}

start := func() {
Expand Down
2 changes: 1 addition & 1 deletion layer_exposure_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func TestLayerExposure(t *testing.T) {
var mockedServerTime int64
doMock := func() {
now = func() time.Time { return time.Date(2022, 12, 12, 0, 0, 0, 0, time.Local) }
mockedServerTime = now().UnixMilli()
mockedServerTime = now().Unix() * 1000
}

start := func() {
Expand Down

0 comments on commit 1be8eb8

Please sign in to comment.