Skip to content

Commit

Permalink
update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
kataras committed Sep 28, 2024
1 parent 45f3785 commit 5347f57
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 387 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ jobs:

strategy:
matrix:
go_version: [1.19.x]
go_version: [1.23.x]
steps:

- name: Set up Go 1.x
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go_version }}

- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Test
run: go test -v ./...
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2020-2022 Gerasimos Maropoulos <[email protected]>
Copyright (c) 2020-2024 Gerasimos Maropoulos <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This package is under active development and a **work-in-progress** project. You

## Installation

The only requirement is the [Go Programming Language](https://golang.org/dl).
The only requirement is the [Go Programming Language](https://go.dev/dl).

```sh
$ go get github.com/kataras/sheets@latest
Expand Down
5 changes: 4 additions & 1 deletion authentication.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const (
//
// It panics on errors.
func ServiceAccount(ctx context.Context, serviceAccountFile string, scopes ...string) http.RoundTripper {
b, err := ioutil.ReadFile(serviceAccountFile)
b, err := os.ReadFile(serviceAccountFile)
if err != nil {
log.Fatalf("Unable to read service account secret file: %v", err)
}
Expand All @@ -38,6 +38,9 @@ func ServiceAccount(ctx context.Context, serviceAccountFile string, scopes ...st
}

config, err := google.JWTConfigFromJSON(b, scopes...)
if err != nil {
log.Fatalf("Unable to parse service account secret file to config: %v", err)
}
client := config.Client(ctx)
return client.Transport
}
Expand Down
4 changes: 3 additions & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ func (c *Client) Do(ctx context.Context, method, url string, body io.Reader, opt
return nil, err
}

req.URL.Query().Set("prettyPrint", "false")
query := req.URL.Query()
query.Set("prettyPrint", "false")
req.URL.RawQuery = query.Encode()

req.Header.Add("Accept", "application/json")
req.Header.Add("Accept-Encoding", "gzip")
Expand Down
7 changes: 4 additions & 3 deletions error.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ func (e *ResourceError) Error() string {
// IsStatusError reports whether a "target" error is type of `ResourceError` and the status code is the provided "statusCode" one.
// Usage:
// resErr, ok := IsStatusError(http.StatusNotFound, err)
// if ok {
// [ressErr.Method, URL, StatusCode, Message...]
// }
//
// if ok {
// [ressErr.Method, URL, StatusCode, Message...]
// }
//
// See `IsResourceError` too.
func IsStatusError(statusCode int, target error) (*ResourceError, bool) {
Expand Down
12 changes: 3 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
module github.com/kataras/sheets

go 1.19
go 1.23

require golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb
require golang.org/x/oauth2 v0.23.0

require (
cloud.google.com/go v0.65.0 // indirect
github.com/golang/protobuf v1.4.2 // indirect
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect
google.golang.org/appengine v1.6.6 // indirect
google.golang.org/protobuf v1.25.0 // indirect
)
require cloud.google.com/go/compute/metadata v0.3.0 // indirect
374 changes: 6 additions & 368 deletions go.sum

Large diffs are not rendered by default.

0 comments on commit 5347f57

Please sign in to comment.