Skip to content

Commit

Permalink
chore: bump go-sdk version, update changelog
Browse files Browse the repository at this point in the history
feat: use RFC3339 in place of ISO8601 layout string

fix: resolve linting error from newline

docs: Update changelog with start time and prep for 0.6.4 release
  • Loading branch information
ryanpq committed Feb 6, 2025
1 parent 877aa21 commit b00b8b3
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

#### [Unreleased](https://github.com/openfga/cli/compare/v0.6.3...HEAD) (2025-02-06)
Added:
- Support for start-time parameter in changes command (#443)

#### [0.6.3](https://github.com/openfga/cli/compare/v0.6.2...v0.6.3) (2025-01-22)

Added:
Expand Down
4 changes: 1 addition & 3 deletions cmd/tuple/changes.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ func readChanges(
var startTimeObj *time.Time

if startTime != "" {
layout := "2006-01-02T15:04:05Z"

parsedTime, err := time.Parse(layout, startTime)
parsedTime, err := time.Parse(time.RFC3339, startTime)
if err != nil {
return nil, fmt.Errorf("failed to parse startTime: %w", err)
}
Expand Down
12 changes: 3 additions & 9 deletions cmd/tuple/changes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ func TestReadChangesEmpty(t *testing.T) {
func TestReadChangesSinglePage(t *testing.T) {
t.Parallel()

const layout = "2006-01-02T15:04:05Z"

mockCtrl := gomock.NewController(t)
defer mockCtrl.Finish()
mockFgaClient := mock_client.NewMockSdkClient(mockCtrl)
Expand Down Expand Up @@ -141,7 +139,7 @@ func TestReadChangesSinglePage(t *testing.T) {

mockBody := mock_client.NewMockSdkClientReadChangesRequestInterface(mockCtrl)

sTime, err := time.Parse(layout, "2022-01-01T00:00:00Z")
sTime, err := time.Parse(time.RFC3339, "2022-01-01T00:00:00Z")
if err != nil {
t.Error(err)
}
Expand Down Expand Up @@ -174,8 +172,6 @@ func TestReadChangesSinglePage(t *testing.T) {
func TestReadChangesMultiPages(t *testing.T) {
t.Parallel()

const layout = "2006-01-02T15:04:05Z"

mockCtrl := gomock.NewController(t)
defer mockCtrl.Finish()

Expand Down Expand Up @@ -242,7 +238,7 @@ func TestReadChangesMultiPages(t *testing.T) {
mockBody1 := mock_client.NewMockSdkClientReadChangesRequestInterface(mockCtrl)
mockBody2 := mock_client.NewMockSdkClientReadChangesRequestInterface(mockCtrl)

sTime, err := time.Parse(layout, "2022-01-01T00:00:00Z")
sTime, err := time.Parse(time.RFC3339, "2022-01-01T00:00:00Z")
if err != nil {
t.Error(err)
}
Expand Down Expand Up @@ -282,8 +278,6 @@ func TestReadChangesMultiPages(t *testing.T) {
func TestReadChangesMultiPagesLimit(t *testing.T) {
t.Parallel()

const layout = "2006-01-02T15:04:05Z"

mockCtrl := gomock.NewController(t)
defer mockCtrl.Finish()
mockFgaClient := mock_client.NewMockSdkClient(mockCtrl)
Expand Down Expand Up @@ -321,7 +315,7 @@ func TestReadChangesMultiPagesLimit(t *testing.T) {

mockBody := mock_client.NewMockSdkClientReadChangesRequestInterface(mockCtrl)

sTime, err := time.Parse(layout, "2022-01-01T00:00:00Z")
sTime, err := time.Parse(time.RFC3339, "2022-01-01T00:00:00Z")
if err != nil {
t.Error(err)
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/nwidger/jsoncolor v0.3.2
github.com/oklog/ulid/v2 v2.1.0
github.com/openfga/api/proto v0.0.0-20250107154247-c22e6db5c4f5
github.com/openfga/go-sdk v0.6.5-0.20250205144545-22df3ecba077
github.com/openfga/go-sdk v0.6.5
github.com/openfga/language/pkg/go v0.2.0-beta.2.0.20241115164311-10e575c8e47c
github.com/openfga/openfga v1.8.4
github.com/spf13/cobra v1.8.1
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ github.com/openfga/go-sdk v0.6.4 h1:VAeH9exZuG1qaBt41+mjIK5RxTtuL9maS4d47YsYGZw=
github.com/openfga/go-sdk v0.6.4/go.mod h1:zui7pHE3eLAYh2fFmEMrWg9XbxYns2WW5Xr/GEgili4=
github.com/openfga/go-sdk v0.6.5-0.20250205144545-22df3ecba077 h1:o1s2Y5cjg/ALF9vN2BiTcF6ucrGDGfJKR7N8QdjKcR4=
github.com/openfga/go-sdk v0.6.5-0.20250205144545-22df3ecba077/go.mod h1:zui7pHE3eLAYh2fFmEMrWg9XbxYns2WW5Xr/GEgili4=
github.com/openfga/go-sdk v0.6.5 h1:2bxZkoLyphOahFETo9wPvls1AQ3IqbsygIyDkzRvx1k=
github.com/openfga/go-sdk v0.6.5/go.mod h1:zui7pHE3eLAYh2fFmEMrWg9XbxYns2WW5Xr/GEgili4=
github.com/openfga/language/pkg/go v0.2.0-beta.2.0.20241115164311-10e575c8e47c h1:1y84C0V4NRfPtRi4MqQ7+gnFtYgeBKPIeIAPLdVJ7j4=
github.com/openfga/language/pkg/go v0.2.0-beta.2.0.20241115164311-10e575c8e47c/go.mod h1:12RMe/HuRNyOzS33RQa53jwdcxE2znr8ycXMlVbgQN4=
github.com/openfga/openfga v1.8.4 h1:OqyRpuxMCxcS7irTFYFkhAIYzmAnczNwxUqjnuZOQyo=
Expand Down

0 comments on commit b00b8b3

Please sign in to comment.