Skip to content

Commit bb98743

Browse files
authored
feat: Migrate to v5.0.0 (#458)
- Update module path in go.mod from v4 to v5 - Update all import paths throughout the codebase - Update version from v4.46.1 to v5.0.0 - Update all documentation to reference v5 This change prepares for the v5.0.0 release with breaking changes.
1 parent 2b61349 commit bb98743

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+98
-98
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# WorkOS Go Library
22

3-
[![Go Reference](https://pkg.go.dev/badge/github.com/workos/workos-go/v4.svg)](https://pkg.go.dev/github.com/workos/workos-go/v4)
3+
[![Go Reference](https://pkg.go.dev/badge/github.com/workos/workos-go/v5.svg)](https://pkg.go.dev/github.com/workos/workos-go/v5)
44

55
The WorkOS library for Go provides convenient access to the WorkOS API from applications written in Go.
66

@@ -13,7 +13,7 @@ See the [API Reference](https://workos.com/docs/reference/client-libraries) for
1313
Install the package with:
1414

1515
```bash
16-
go get -u github.com/workos/workos-go/v4
16+
go get -u github.com/workos/workos-go/v5
1717
```
1818

1919
## Configuration
@@ -28,8 +28,8 @@ Or, you can configure it programmatically before your application starts:
2828

2929
```go
3030
import (
31-
"github.com/workos/workos-go/v4/pkg/sso"
32-
"github.com/workos/workos-go/v4/pkg/directorysync"
31+
"github.com/workos/workos-go/v5/pkg/sso"
32+
"github.com/workos/workos-go/v5/pkg/directorysync"
3333
)
3434

3535
func main() {
@@ -47,12 +47,12 @@ The WorkOS Go library is organized into focused packages. Import only what you n
4747

4848
```go
4949
import (
50-
"github.com/workos/workos-go/v4/pkg/sso" // Single Sign-On
51-
"github.com/workos/workos-go/v4/pkg/directorysync" // Directory Sync (SCIM)
52-
"github.com/workos/workos-go/v4/pkg/usermanagement" // User Management
53-
"github.com/workos/workos-go/v4/pkg/auditlogs" // Audit Logs
54-
"github.com/workos/workos-go/v4/pkg/organizations" // Organizations
55-
"github.com/workos/workos-go/v4/pkg/webhooks" // Webhooks
50+
"github.com/workos/workos-go/v5/pkg/sso" // Single Sign-On
51+
"github.com/workos/workos-go/v5/pkg/directorysync" // Directory Sync (SCIM)
52+
"github.com/workos/workos-go/v5/pkg/usermanagement" // User Management
53+
"github.com/workos/workos-go/v5/pkg/auditlogs" // Audit Logs
54+
"github.com/workos/workos-go/v5/pkg/organizations" // Organizations
55+
"github.com/workos/workos-go/v5/pkg/webhooks" // Webhooks
5656
)
5757
```
5858

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/workos/workos-go/v4
1+
module github.com/workos/workos-go/v5
22

33
go 1.13
44

internal/workos/workos.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ package workos
22

33
const (
44
// Version represents the SDK version number.
5-
Version = "v4.46.1"
5+
Version = "v5.0.0"
66
)

pkg/auditlogs/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
# auditlogs
22

3-
[![Go Report Card](https://img.shields.io/badge/dev-reference-007d9c?logo=go&logoColor=white&style=flat)](https://pkg.go.dev/github.com/workos/workos-go/v4/pkg/auditlogs)
3+
[![Go Report Card](https://img.shields.io/badge/dev-reference-007d9c?logo=go&logoColor=white&style=flat)](https://pkg.go.dev/github.com/workos/workos-go/v5/pkg/auditlogs)
44

55
A Go package to send audit log events to WorkOS.
66

77
## Install
88

99
```sh
10-
go get -u github.com/workos/workos-go/v4/pkg/auditlogs
10+
go get -u github.com/workos/workos-go/v5/pkg/auditlogs
1111
```
1212

1313
## How it works
1414

1515
```go
1616
package main
1717

18-
import "github.com/workos/workos-go/v4/pkg/auditlogs"
18+
import "github.com/workos/workos-go/v5/pkg/auditlogs"
1919

2020
func main() {
2121
auditlogs.SetAPIKey("my_api_key")

pkg/auditlogs/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import (
88
"sync"
99
"time"
1010

11-
"github.com/workos/workos-go/v4/pkg/workos_errors"
11+
"github.com/workos/workos-go/v5/pkg/workos_errors"
1212

13-
"github.com/workos/workos-go/v4/internal/workos"
13+
"github.com/workos/workos-go/v5/internal/workos"
1414
)
1515

1616
// ResponseLimit is the default number of records to limit a response to.

pkg/auditlogs/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package auditlogs
33
import (
44
"context"
55
"encoding/json"
6-
"github.com/workos/workos-go/v4/pkg/workos_errors"
6+
"github.com/workos/workos-go/v5/pkg/workos_errors"
77
"net/http"
88
"net/http/httptest"
99
"testing"

pkg/directorysync/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# directorysync
22

3-
[![Go Report Card](https://img.shields.io/badge/dev-reference-007d9c?logo=go&logoColor=white&style=flat)](https://pkg.go.dev/github.com/workos/workos-go/v4/pkg/directorysync)
3+
[![Go Report Card](https://img.shields.io/badge/dev-reference-007d9c?logo=go&logoColor=white&style=flat)](https://pkg.go.dev/github.com/workos/workos-go/v5/pkg/directorysync)
44

55
A Go package to make requests to the WorkOS Directory Sync API.
66

77
## Install
88

99
```sh
10-
go get -u github.com/workos/workos-go/v4/pkg/directorysync
10+
go get -u github.com/workos/workos-go/v5/pkg/directorysync
1111
```
1212

1313
## How it works

pkg/directorysync/client.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ import (
99
"time"
1010

1111
"github.com/google/go-querystring/query"
12-
"github.com/workos/workos-go/v4/pkg/workos_errors"
12+
"github.com/workos/workos-go/v5/pkg/workos_errors"
1313

14-
"github.com/workos/workos-go/v4/internal/workos"
15-
"github.com/workos/workos-go/v4/pkg/common"
14+
"github.com/workos/workos-go/v5/internal/workos"
15+
"github.com/workos/workos-go/v5/pkg/common"
1616
)
1717

1818
// ResponseLimit is the default number of records to limit a response to.

pkg/directorysync/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"testing"
1010

1111
"github.com/stretchr/testify/require"
12-
"github.com/workos/workos-go/v4/pkg/common"
12+
"github.com/workos/workos-go/v5/pkg/common"
1313
)
1414

1515
func TestListUsers(t *testing.T) {

pkg/directorysync/directorysync_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"testing"
99

1010
"github.com/stretchr/testify/require"
11-
"github.com/workos/workos-go/v4/pkg/common"
11+
"github.com/workos/workos-go/v5/pkg/common"
1212
)
1313

1414
func TestDirectorySyncListUsers(t *testing.T) {

0 commit comments

Comments
 (0)