Skip to content

Commit ac3e18a

Browse files
release: 0.1.0-alpha.3 (#18)
* feat(api): disable retries * fix(internal): unmarshal correctly when there are multiple discriminators * codegen metadata * feat(api): add vm images resources and update formatting * codegen metadata * feat(api): api update * fix(api): remove undocumented endpoints, add list endpoint * feat(api): api update * feat(api): api update * feat(api): api update * codegen metadata * codegen metadata * chore: bump minimum go version to 1.22 * chore: update more docs for 1.22 * fix: use slices.Concat instead of sometimes modifying r.Options * chore: do not install brew dependencies in ./scripts/bootstrap by default * chore: configure new SDK language * release: 0.1.0-alpha.3 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent a0db85a commit ac3e18a

23 files changed

+706
-158
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.1.0-alpha.2"
2+
".": "0.1.0-alpha.3"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 9
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company%2Fsfc-nodes-64b3af1a7aa80906205b3369d34afb7c2686ab1c184f4683d81f2e3adffa255e.yml
3-
openapi_spec_hash: 4a63ec0585f1f25c42f1a612345f7ab4
4-
config_hash: b63d685bc4feb4db73f82791193686bd
1+
configured_endpoints: 13
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company%2Fsfc-nodes-92d29637c0ceda06c752ad70b078ff8dad505843c16b923130774376890baaa5.yml
3+
openapi_spec_hash: 1f20f7d76aa5575ee0601ece537af956
4+
config_hash: cf202573c712b5d91a4d496f35f0ff57

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,33 @@
11
# Changelog
22

3+
## 0.1.0-alpha.3 (2025-10-13)
4+
5+
Full Changelog: [v0.1.0-alpha.2...v0.1.0-alpha.3](https://github.com/sfcompute/nodes-go/compare/v0.1.0-alpha.2...v0.1.0-alpha.3)
6+
7+
### Features
8+
9+
* **api:** add vm images resources and update formatting ([273c45f](https://github.com/sfcompute/nodes-go/commit/273c45f75e75104ad10eb1eab1bdb7acc3596cce))
10+
* **api:** api update ([97607e0](https://github.com/sfcompute/nodes-go/commit/97607e02d439b4fe1463a483d362ab5bf65fd708))
11+
* **api:** api update ([5788fb0](https://github.com/sfcompute/nodes-go/commit/5788fb0d297e3c4f79e76e1f2369bd086dad610b))
12+
* **api:** api update ([59b16bc](https://github.com/sfcompute/nodes-go/commit/59b16bcc748ffea703644d6332f33a79196aeeee))
13+
* **api:** api update ([d9c2daa](https://github.com/sfcompute/nodes-go/commit/d9c2daa0151d664a5bbff0609d0a6e1e6db3b8c8))
14+
* **api:** disable retries ([8c19a86](https://github.com/sfcompute/nodes-go/commit/8c19a865b584b8dc40feecd1a26e3d8d9a013230))
15+
16+
17+
### Bug Fixes
18+
19+
* **api:** remove undocumented endpoints, add list endpoint ([ee795ee](https://github.com/sfcompute/nodes-go/commit/ee795ee93f88b5c379d9ce834356c59fae43e162))
20+
* **internal:** unmarshal correctly when there are multiple discriminators ([2836b68](https://github.com/sfcompute/nodes-go/commit/2836b6828c5f60e8c0c4e8892bbefa54e54b64b8))
21+
* use slices.Concat instead of sometimes modifying r.Options ([6adf0a1](https://github.com/sfcompute/nodes-go/commit/6adf0a14ecd1b5d20924b1b26816af8c5ed270ad))
22+
23+
24+
### Chores
25+
26+
* bump minimum go version to 1.22 ([90c5664](https://github.com/sfcompute/nodes-go/commit/90c566457cad4e6964d6217feeb21eb699d2c385))
27+
* configure new SDK language ([42f31df](https://github.com/sfcompute/nodes-go/commit/42f31df1c143e56ca36cea4b5de2b937ac000c7c))
28+
* do not install brew dependencies in ./scripts/bootstrap by default ([5983889](https://github.com/sfcompute/nodes-go/commit/5983889bfd8681434b39372a0d58fe60115ff267))
29+
* update more docs for 1.22 ([82733b2](https://github.com/sfcompute/nodes-go/commit/82733b2eff62084fa0b0e415e8a3ad6e1f8f546c))
30+
331
## 0.1.0-alpha.2 (2025-09-05)
432

533
Full Changelog: [v0.1.0-alpha.1...v0.1.0-alpha.2](https://github.com/sfcompute/nodes-go/compare/v0.1.0-alpha.1...v0.1.0-alpha.2)

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ $ ./scripts/lint
99

1010
This will install all the required dependencies and build the SDK.
1111

12-
You can also [install go 1.18+ manually](https://go.dev/doc/install).
12+
You can also [install go 1.22+ manually](https://go.dev/doc/install).
1313

1414
## Modifying/Adding code
1515

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ Or to pin the version:
2828
<!-- x-release-please-start-version -->
2929

3030
```sh
31-
go get -u 'github.com/sfcompute/[email protected].2'
31+
go get -u 'github.com/sfcompute/[email protected].3'
3232
```
3333

3434
<!-- x-release-please-end -->
3535

3636
## Requirements
3737

38-
This library requires Go 1.18+.
38+
This library requires Go 1.22+.
3939

4040
## Usage
4141

@@ -345,7 +345,7 @@ which can be used to wrap any `io.Reader` with the appropriate file name and con
345345

346346
### Retries
347347

348-
Certain errors will be automatically retried 2 times by default, with a short exponential backoff.
348+
Certain errors will be automatically retried 0 times by default, with a short exponential backoff.
349349
We retry by default all connection errors, 408 Request Timeout, 409 Conflict, 429 Rate Limit,
350350
and >=500 Internal errors.
351351

api.md

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
# Vms
1+
# VMs
22

33
Response Types:
44

5-
- <a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#VmLogsResponse">VmLogsResponse</a>
6-
- <a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#VmSSHResponse">VmSSHResponse</a>
5+
- <a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#VMLogsResponse">VMLogsResponse</a>
6+
- <a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#VmsshResponse">VmsshResponse</a>
77

88
Methods:
99

10-
- <code title="get /v0/vms/logs2">client.Vms.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#VmService.Logs">Logs</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, query <a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#VmLogsParams">VmLogsParams</a>) (<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#VmLogsResponse">VmLogsResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
11-
- <code title="get /v0/vms/ssh">client.Vms.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#VmService.SSH">SSH</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, query <a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#VmSSHParams">VmSSHParams</a>) (<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#VmSSHResponse">VmSSHResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
10+
- <code title="get /v0/vms/logs2">client.VMs.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#VMService.Logs">Logs</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, query <a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#VMLogsParams">VMLogsParams</a>) (<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#VMLogsResponse">VMLogsResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
11+
- <code title="get /v0/vms/ssh">client.VMs.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#VMService.SSH">SSH</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, query <a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#VMSSHParams">VMSSHParams</a>) (<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#VmsshResponse">VmsshResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
1212

1313
## Script
1414

@@ -19,13 +19,25 @@ Params Types:
1919
Response Types:
2020

2121
- <a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#UserDataUnion">UserDataUnion</a>
22-
- <a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#VmScriptNewResponse">VmScriptNewResponse</a>
23-
- <a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#VmScriptGetResponse">VmScriptGetResponse</a>
22+
- <a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#VMScriptNewResponse">VMScriptNewResponse</a>
23+
- <a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#VMScriptGetResponse">VMScriptGetResponse</a>
2424

2525
Methods:
2626

27-
- <code title="post /v0/vms/script">client.Vms.Script.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#VmScriptService.New">New</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, body <a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#VmScriptNewParams">VmScriptNewParams</a>) (<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#VmScriptNewResponse">VmScriptNewResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
28-
- <code title="get /v0/vms/script">client.Vms.Script.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#VmScriptService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>) (<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#VmScriptGetResponse">VmScriptGetResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
27+
- <code title="post /v0/vms/script">client.VMs.Script.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#VMScriptService.New">New</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, body <a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#VMScriptNewParams">VMScriptNewParams</a>) (<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#VMScriptNewResponse">VMScriptNewResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
28+
- <code title="get /v0/vms/script">client.VMs.Script.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#VMScriptService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>) (<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#VMScriptGetResponse">VMScriptGetResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
29+
30+
## Images
31+
32+
Response Types:
33+
34+
- <a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#VMImageListResponse">VMImageListResponse</a>
35+
- <a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#VMImageGetResponse">VMImageGetResponse</a>
36+
37+
Methods:
38+
39+
- <code title="get /v1/vms/images">client.VMs.Images.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#VMImageService.List">List</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>) (<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#VMImageListResponse">VMImageListResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
40+
- <code title="get /v1/vms/images/{image_id}">client.VMs.Images.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#VMImageService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, imageID <a href="https://pkg.go.dev/builtin#string">string</a>) (<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#VMImageGetResponse">VMImageGetResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
2941

3042
# Nodes
3143

@@ -47,6 +59,8 @@ Methods:
4759

4860
- <code title="post /v1/nodes">client.Nodes.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#NodeService.New">New</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, body <a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#NodeNewParams">NodeNewParams</a>) (<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#ListResponseNode">ListResponseNode</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
4961
- <code title="get /v1/nodes">client.Nodes.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#NodeService.List">List</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, query <a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#NodeListParams">NodeListParams</a>) (<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#ListResponseNode">ListResponseNode</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
62+
- <code title="delete /v1/nodes/{id}">client.Nodes.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#NodeService.Delete">Delete</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, id <a href="https://pkg.go.dev/builtin#string">string</a>) <a href="https://pkg.go.dev/builtin#error">error</a></code>
5063
- <code title="patch /v1/nodes/{id}/extend">client.Nodes.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#NodeService.Extend">Extend</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, id <a href="https://pkg.go.dev/builtin#string">string</a>, body <a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#NodeExtendParams">NodeExtendParams</a>) (<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#Node">Node</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
5164
- <code title="get /v1/nodes/{id}">client.Nodes.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#NodeService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, id <a href="https://pkg.go.dev/builtin#string">string</a>) (<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#Node">Node</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
65+
- <code title="put /v1/nodes/{id}/redeploy">client.Nodes.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#NodeService.Redeploy">Redeploy</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, id <a href="https://pkg.go.dev/builtin#string">string</a>, body <a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#NodeRedeployParams">NodeRedeployParams</a>) (<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#Node">Node</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
5266
- <code title="patch /v1/nodes/{id}/release">client.Nodes.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#NodeService.Release">Release</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, id <a href="https://pkg.go.dev/builtin#string">string</a>) (<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go">sfcnodes</a>.<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go#Node">Node</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>

client.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"context"
77
"net/http"
88
"os"
9+
"slices"
910

1011
"github.com/sfcompute/nodes-go/internal/requestconfig"
1112
"github.com/sfcompute/nodes-go/option"
@@ -16,7 +17,7 @@ import (
1617
// directly, and instead use the [NewClient] method instead.
1718
type Client struct {
1819
Options []option.RequestOption
19-
Vms VmService
20+
VMs VMService
2021
Nodes NodeService
2122
}
2223

@@ -42,7 +43,7 @@ func NewClient(opts ...option.RequestOption) (r Client) {
4243

4344
r = Client{Options: opts}
4445

45-
r.Vms = NewVmService(opts...)
46+
r.VMs = NewVMService(opts...)
4647
r.Nodes = NewNodeService(opts...)
4748

4849
return
@@ -80,7 +81,7 @@ func NewClient(opts ...option.RequestOption) (r Client) {
8081
// For even greater flexibility, see [option.WithResponseInto] and
8182
// [option.WithResponseBodyInto].
8283
func (r *Client) Execute(ctx context.Context, method string, path string, params any, res any, opts ...option.RequestOption) error {
83-
opts = append(r.Options, opts...)
84+
opts = slices.Concat(r.Options, opts)
8485
return requestconfig.ExecuteNewRequest(ctx, method, path, params, res, opts...)
8586
}
8687

client_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ func TestRetryAfter(t *testing.T) {
6868
}
6969

7070
attempts := len(retryCountHeaders)
71-
if attempts != 3 {
72-
t.Errorf("Expected %d attempts, got %d", 3, attempts)
71+
if attempts != 1 {
72+
t.Errorf("Expected %d attempts, got %d", 1, attempts)
7373
}
7474

75-
expectedRetryCountHeaders := []string{"0", "1", "2"}
75+
expectedRetryCountHeaders := []string{"0"}
7676
if !reflect.DeepEqual(retryCountHeaders, expectedRetryCountHeaders) {
7777
t.Errorf("Expected %v retry count headers, got %v", expectedRetryCountHeaders, retryCountHeaders)
7878
}
@@ -102,7 +102,7 @@ func TestDeleteRetryCountHeader(t *testing.T) {
102102
t.Error("Expected there to be a cancel error")
103103
}
104104

105-
expectedRetryCountHeaders := []string{"", "", ""}
105+
expectedRetryCountHeaders := []string{""}
106106
if !reflect.DeepEqual(retryCountHeaders, expectedRetryCountHeaders) {
107107
t.Errorf("Expected %v retry count headers, got %v", expectedRetryCountHeaders, retryCountHeaders)
108108
}
@@ -132,7 +132,7 @@ func TestOverwriteRetryCountHeader(t *testing.T) {
132132
t.Error("Expected there to be a cancel error")
133133
}
134134

135-
expectedRetryCountHeaders := []string{"42", "42", "42"}
135+
expectedRetryCountHeaders := []string{"42"}
136136
if !reflect.DeepEqual(retryCountHeaders, expectedRetryCountHeaders) {
137137
t.Errorf("Expected %v retry count headers, got %v", expectedRetryCountHeaders, retryCountHeaders)
138138
}
@@ -160,7 +160,7 @@ func TestRetryAfterMs(t *testing.T) {
160160
if err == nil {
161161
t.Error("Expected there to be a cancel error")
162162
}
163-
if want := 3; attempts != want {
163+
if want := 1; attempts != want {
164164
t.Errorf("Expected %d attempts, got %d", want, attempts)
165165
}
166166
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/sfcompute/nodes-go
22

3-
go 1.21
3+
go 1.22
44

55
require (
66
github.com/tidwall/gjson v1.14.4

0 commit comments

Comments
 (0)