Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: migrate package and upgrade to go1.23 #1

Merged
merged 3 commits into from
Jan 29, 2025
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
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.15
go-version: 1.23

- name: Build
run: go build -v ./...
- name: golangci-lint
uses: golangci/[email protected]

- name: Test
run: go test -v ./...

- name: golangci-lint
uses: golangci/[email protected]
- name: Build
run: go build -v ./...
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ First, please follow the [Getting Started Guide](https://developers.notion.com/d
Import this library and initialize the API client using the obtained integration token.

```go
import "github.com/jomei/notionapi"
import "github.com/qonto/notionapi"

client := notionapi.NewClient("your_integration_token")
```
Expand Down
2 changes: 1 addition & 1 deletion authentication_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"reflect"
"testing"

"github.com/jomei/notionapi"
"github.com/qonto/notionapi"
)

func TestAuthenticationClient(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions block_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package notionapi_test
import (
"context"
"encoding/json"
"io/ioutil"
"net/http"
"os"
"reflect"
"testing"
"time"

"github.com/jomei/notionapi"
"github.com/qonto/notionapi"
)

func TestBlockClient(t *testing.T) {
Expand Down Expand Up @@ -469,7 +469,7 @@ func TestBlockArrayUnmarshal(t *testing.T) {

for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
data, err := ioutil.ReadFile(tt.filePath)
data, err := os.ReadFile(tt.filePath)
if err != nil {
t.Fatal(err)
}
Expand Down
3 changes: 1 addition & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net/http"
"net/url"
"reflect"
Expand Down Expand Up @@ -190,7 +189,7 @@ func (c *Client) requestImpl(ctx context.Context, method string, urlStr string,
}

if res.StatusCode != http.StatusOK {
data, err := ioutil.ReadAll(res.Body)
data, err := io.ReadAll(res.Body)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"os"
"testing"

"github.com/jomei/notionapi"
"github.com/qonto/notionapi"
)

// RoundTripFunc .
Expand Down
2 changes: 1 addition & 1 deletion comment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"testing"
"time"

"github.com/jomei/notionapi"
"github.com/qonto/notionapi"
)

func TestCommentClient(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion database_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"testing"
"time"

"github.com/jomei/notionapi"
"github.com/qonto/notionapi"
)

func TestDatabaseClient(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/jomei/notionapi
module github.com/qonto/notionapi

go 1.14
go 1.23
2 changes: 1 addition & 1 deletion object_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"reflect"
"testing"

"github.com/jomei/notionapi"
"github.com/qonto/notionapi"
)

func TestDate(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion page_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"testing"
"time"

"github.com/jomei/notionapi"
"github.com/qonto/notionapi"
)

func TestPageClient(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion search_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package notionapi_test

import (
"context"
"github.com/jomei/notionapi"
"net/http"
"testing"

"github.com/qonto/notionapi"
)

func TestSearchClient(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ package notionapi_test

import (
"context"
"github.com/jomei/notionapi"
"net/http"
"reflect"
"testing"

"github.com/qonto/notionapi"
)

func TestUserClient(t *testing.T) {
Expand Down