Skip to content

Commit

Permalink
Merge branch 'main' into databases-fix-display-options-kv
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewsomething authored Oct 10, 2023
2 parents 1f0ebc8 + 1d2e1ea commit efc1a39
Show file tree
Hide file tree
Showing 10 changed files with 61 additions and 37 deletions.
4 changes: 2 additions & 2 deletions commands/billing_history_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ var testBillingHistoryList = &do.BillingHistory{
{
Description: "Invoice for May 2018",
Amount: "12.34",
InvoiceID: godo.String("123"),
InvoiceUUID: godo.String("example-uuid"),
InvoiceID: godo.PtrTo("123"),
InvoiceUUID: godo.PtrTo("example-uuid"),
Date: time.Date(2018, 6, 1, 8, 44, 38, 0, time.UTC),
Type: "Invoice",
},
Expand Down
6 changes: 3 additions & 3 deletions commands/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,10 +405,10 @@ func RunRegistryLogin(c *CmdConfig) error {

regCredReq := godo.RegistryDockerCredentialsRequest{
ReadWrite: !readOnly,
ExpirySeconds: godo.Int(defaultRegistryAPITokenExpirySeconds),
ExpirySeconds: godo.PtrTo(defaultRegistryAPITokenExpirySeconds),
}
if expirySeconds != 0 {
regCredReq.ExpirySeconds = godo.Int(expirySeconds)
regCredReq.ExpirySeconds = godo.PtrTo(expirySeconds)
}
if neverExpire {
regCredReq.ExpirySeconds = nil
Expand Down Expand Up @@ -548,7 +548,7 @@ func RunDockerConfig(c *CmdConfig) error {
ReadWrite: readWrite,
}
if expirySeconds != 0 {
regCredReq.ExpirySeconds = godo.Int(expirySeconds)
regCredReq.ExpirySeconds = godo.PtrTo(expirySeconds)
}

dockerCreds, err := c.Registry().DockerCredentials(&regCredReq)
Expand Down
8 changes: 4 additions & 4 deletions commands/registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ func TestDockerConfig(t *testing.T) {
expect: func(m *mocks.MockRegistryService) {
m.EXPECT().DockerCredentials(&godo.RegistryDockerCredentialsRequest{
ReadWrite: false,
ExpirySeconds: godo.Int(3600),
ExpirySeconds: godo.PtrTo(3600),
}).Return(testDockerCredentials, nil)
},
},
Expand All @@ -258,7 +258,7 @@ func TestDockerConfig(t *testing.T) {
expect: func(m *mocks.MockRegistryService) {
m.EXPECT().DockerCredentials(&godo.RegistryDockerCredentialsRequest{
ReadWrite: true,
ExpirySeconds: godo.Int(3600),
ExpirySeconds: godo.PtrTo(3600),
}).Return(testDockerCredentials, nil)
},
},
Expand Down Expand Up @@ -662,7 +662,7 @@ func TestRegistryLogin(t *testing.T) {
m.EXPECT().Endpoint().Return(do.RegistryHostname)
m.EXPECT().DockerCredentials(&godo.RegistryDockerCredentialsRequest{
ReadWrite: true,
ExpirySeconds: godo.Int(3600),
ExpirySeconds: godo.PtrTo(3600),
}).Return(testDockerCredentials, nil)
},
},
Expand All @@ -674,7 +674,7 @@ func TestRegistryLogin(t *testing.T) {
m.EXPECT().Endpoint().Return(do.RegistryHostname)
m.EXPECT().DockerCredentials(&godo.RegistryDockerCredentialsRequest{
ReadWrite: false,
ExpirySeconds: godo.Int(defaultRegistryAPITokenExpirySeconds),
ExpirySeconds: godo.PtrTo(defaultRegistryAPITokenExpirySeconds),
}).Return(testDockerCredentials, nil)
},
},
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.21
require (
github.com/blang/semver v3.5.1+incompatible
github.com/creack/pty v1.1.11
github.com/digitalocean/godo v1.103.0
github.com/digitalocean/godo v1.104.0
github.com/docker/cli v24.0.5+incompatible
github.com/docker/docker v24.0.5+incompatible
github.com/docker/docker-credential-helpers v0.7.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/digitalocean/godo v1.103.0 h1:ynhlulyoBN+VvQ/yquIsh93DlY3lZxmcwgiw3XrsAyQ=
github.com/digitalocean/godo v1.103.0/go.mod h1:rUTTOeu4ozN+i3BnyQasMpDyhIVIefANbc4dYe6v6N0=
github.com/digitalocean/godo v1.104.0 h1:bIOKADMS9hKn/qqgbquCmCAUIrZ5dkthdyy9MsdPx8E=
github.com/digitalocean/godo v1.104.0/go.mod h1:rUTTOeu4ozN+i3BnyQasMpDyhIVIefANbc4dYe6v6N0=
github.com/docker/cli v24.0.5+incompatible h1:WeBimjvS0eKdH4Ygx+ihVq1Q++xg36M/rMi4aXAvodc=
github.com/docker/cli v24.0.5+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8=
Expand Down
5 changes: 5 additions & 0 deletions vendor/github.com/digitalocean/godo/CHANGELOG.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions vendor/github.com/digitalocean/godo/apps.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions vendor/github.com/digitalocean/godo/apps_accessors.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 30 additions & 21 deletions vendor/github.com/digitalocean/godo/uptime.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ github.com/creack/pty
# github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
## explicit
github.com/davecgh/go-spew/spew
# github.com/digitalocean/godo v1.103.0
# github.com/digitalocean/godo v1.104.0
## explicit; go 1.21
github.com/digitalocean/godo
github.com/digitalocean/godo/metrics
Expand Down

0 comments on commit efc1a39

Please sign in to comment.