Skip to content

Commit 33b9553

Browse files
authored
all: upgrade to Go 1.23.0 (#2229)
1 parent 495cb07 commit 33b9553

File tree

25 files changed

+116
-88
lines changed

25 files changed

+116
-88
lines changed

devbox.lock

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,60 +2,60 @@
22
"lockfile_version": "1",
33
"packages": {
44
"go@latest": {
5-
"last_modified": "2024-05-29T10:04:41Z",
6-
"resolved": "github:NixOS/nixpkgs/ac82a513e55582291805d6f09d35b6d8b60637a1#go",
5+
"last_modified": "2024-08-14T11:41:26Z",
6+
"resolved": "github:NixOS/nixpkgs/0cb2fd7c59fed0cd82ef858cbcbdb552b9a33465#go_1_23",
77
"source": "devbox-search",
8-
"version": "1.22.3",
8+
"version": "1.23.0",
99
"systems": {
1010
"aarch64-darwin": {
1111
"outputs": [
1212
{
1313
"name": "out",
14-
"path": "/nix/store/i04a1a6qgxhjw6c0ld2b3x1v815sbxjc-go-1.22.3",
14+
"path": "/nix/store/x097y3rdlvw6ax1id52xx2didgzxjg34-go-1.23.0",
1515
"default": true
1616
}
1717
],
18-
"store_path": "/nix/store/i04a1a6qgxhjw6c0ld2b3x1v815sbxjc-go-1.22.3"
18+
"store_path": "/nix/store/x097y3rdlvw6ax1id52xx2didgzxjg34-go-1.23.0"
1919
},
2020
"aarch64-linux": {
2121
"outputs": [
2222
{
2323
"name": "out",
24-
"path": "/nix/store/d68f2iblysnl0r4qcfdacmdpmvvy86kf-go-1.22.3",
24+
"path": "/nix/store/znns5qk7fbhjb89bqhabxjxpgiq2ag1a-go-1.23.0",
2525
"default": true
2626
}
2727
],
28-
"store_path": "/nix/store/d68f2iblysnl0r4qcfdacmdpmvvy86kf-go-1.22.3"
28+
"store_path": "/nix/store/znns5qk7fbhjb89bqhabxjxpgiq2ag1a-go-1.23.0"
2929
},
3030
"x86_64-darwin": {
3131
"outputs": [
3232
{
3333
"name": "out",
34-
"path": "/nix/store/1p6vr83cgyfwm8517jhfmf6lypzhy3q2-go-1.22.3",
34+
"path": "/nix/store/psym5ggdincwihwd81kssc4gbw1k3p3h-go-1.23.0",
3535
"default": true
3636
}
3737
],
38-
"store_path": "/nix/store/1p6vr83cgyfwm8517jhfmf6lypzhy3q2-go-1.22.3"
38+
"store_path": "/nix/store/psym5ggdincwihwd81kssc4gbw1k3p3h-go-1.23.0"
3939
},
4040
"x86_64-linux": {
4141
"outputs": [
4242
{
4343
"name": "out",
44-
"path": "/nix/store/00mg4vlhzmm7gi9bd5v5ydjlgrywpc3n-go-1.22.3",
44+
"path": "/nix/store/0k144pnsvy0wa3dcl1y3df7d4zskylc4-go-1.23.0",
4545
"default": true
4646
}
4747
],
48-
"store_path": "/nix/store/00mg4vlhzmm7gi9bd5v5ydjlgrywpc3n-go-1.22.3"
48+
"store_path": "/nix/store/0k144pnsvy0wa3dcl1y3df7d4zskylc4-go-1.23.0"
4949
}
5050
}
5151
},
5252
"runx:golangci/golangci-lint@latest": {
53-
"resolved": "golangci/golangci-lint@v1.59.0",
54-
"version": "v1.59.0"
53+
"resolved": "golangci/golangci-lint@v1.60.2",
54+
"version": "v1.60.2"
5555
},
5656
"runx:mvdan/gofumpt@latest": {
57-
"resolved": "mvdan/gofumpt@v0.6.0",
58-
"version": "v0.6.0"
57+
"resolved": "mvdan/gofumpt@v0.7.0",
58+
"version": "v0.7.0"
5959
}
6060
}
6161
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module go.jetpack.io/devbox
22

3-
go 1.22.4
3+
go 1.23.0
44

55
require (
66
github.com/AlecAivazis/survey/v2 v2.3.7

internal/boxcli/auth.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ func authNewTokenCommand() *cobra.Command {
133133
// This is a hack because errors are not returning with correct code.
134134
// Once that is fixed, we can switch to use *connect.Error Code() instead.
135135
if strings.Contains(err.Error(), "permission_denied") {
136-
ux.Ferror(
136+
ux.Ferrorf(
137137
cmd.ErrOrStderr(),
138138
"You do not have permission to create a token. Please contact your"+
139139
" administrator.",
@@ -142,7 +142,7 @@ func authNewTokenCommand() *cobra.Command {
142142
}
143143
return err
144144
}
145-
ux.Fsuccess(cmd.OutOrStdout(), "Token created.\n\n")
145+
ux.Fsuccessf(cmd.OutOrStdout(), "Token created.\n\n")
146146
table := tablewriter.NewWriter(cmd.OutOrStdout())
147147
table.SetRowLine(true)
148148
table.AppendBulk([][]string{

internal/boxcli/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func runCreateCmd(cmd *cobra.Command, args []string, flags *createCmdFlags) erro
8585
return err
8686
}
8787

88-
ux.Fsuccess(
88+
ux.Fsuccessf(
8989
cmd.ErrOrStderr(),
9090
"Initialized devbox project using template %s\n",
9191
flags.template,

internal/boxcli/global.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func ensureGlobalEnvEnabled(cmd *cobra.Command, args []string) error {
108108
}
109109
if !box.IsEnvEnabled() {
110110
fmt.Fprintln(cmd.ErrOrStderr())
111-
ux.Fwarning(
111+
ux.Fwarningf(
112112
cmd.ErrOrStderr(),
113113
`devbox global is not activated.
114114

internal/boxcli/midcobra/midcobra.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func (ex *midcobraExecutable) Execute(ctx context.Context, args []string) int {
7878
}
7979
if errors.As(err, &exitErr) {
8080
if !debug.IsEnabled() {
81-
ux.Ferror(ex.cmd.ErrOrStderr(), "There was an internal error. "+
81+
ux.Ferrorf(ex.cmd.ErrOrStderr(), "There was an internal error. "+
8282
"Run with DEVBOX_DEBUG=1 for a detailed error message, and consider reporting it at "+
8383
"https://github.com/jetify-com/devbox/issues\n")
8484
}

internal/boxcli/search.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ func printSearchResults(
111111

112112
if resultsAreTrimmed {
113113
fmt.Println()
114-
ux.Fwarning(
114+
ux.Fwarningf(
115115
w,
116116
"Showing top 10 results and truncated versions. Use --show-all to "+
117117
"show all.\n\n",

internal/boxcli/secrets.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ func secretsInitFunc(
244244
!box.Config().IsEnvsecEnabled() {
245245
// Handle edge case where directory is already set up, but devbox.json is
246246
// not configured to use jetpack-cloud.
247-
ux.Finfo(
247+
ux.Finfof(
248248
cmd.ErrOrStderr(),
249249
"Secrets already initialized. Adding to devbox config.\n",
250250
)

internal/boxcli/setup.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func setupCmd() *cobra.Command {
3636

3737
func runInstallNixCmd(cmd *cobra.Command) error {
3838
if nix.BinaryInstalled() {
39-
ux.Finfo(
39+
ux.Finfof(
4040
cmd.ErrOrStderr(),
4141
"Nix is already installed. If this is incorrect "+
4242
"please remove the nix-shell binary from your path.\n",
@@ -61,7 +61,7 @@ func nixDaemonFlagVal(cmd *cobra.Command) func() *bool {
6161
return func() *bool {
6262
if !cmd.Flags().Changed(nixDaemonFlag) {
6363
if os.Geteuid() == 0 {
64-
ux.Fwarning(
64+
ux.Fwarningf(
6565
cmd.ErrOrStderr(),
6666
"Running as root. Installing Nix in multi-user mode.\n",
6767
)

internal/boxcli/usererr/usererr.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ package usererr
55

66
import (
77
"fmt"
8+
"io"
89

910
"github.com/pkg/errors"
1011
)
@@ -123,7 +124,7 @@ func (c *combined) Cause() error { return errors.Cause(c.source) }
123124
// Format allows us to use %+v as implemented by github.com/pkg/errors.
124125
func (c *combined) Format(s fmt.State, verb rune) {
125126
if c.source == nil {
126-
fmt.Fprintf(s, c.userMessage)
127+
_, _ = io.WriteString(s, c.userMessage)
127128
return
128129
}
129130
errors.Wrap(c.source, c.userMessage).(interface { //nolint:errorlint

0 commit comments

Comments
 (0)