Skip to content
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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.25.5 AS build
FROM golang:1.26.0 AS build
WORKDIR /app
COPY . .

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '2'

services:
app:
image: golang:1.25.5
image: golang:1.26.0
volumes:
- .:/work
working_dir: /work
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/planetscale/cli

go 1.25.5
go 1.26.0

require (
github.com/99designs/keyring v1.2.2
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/backup/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func DeleteCmd(ch *cmdutil.Helper) *cobra.Command {

if !force {
if ch.Printer.Format() != printer.Human {
return fmt.Errorf("cannot delete backup with the output format %q (run with --force to override)", ch.Printer.Format())
return fmt.Errorf(`cannot delete backup with the output format "%s" (run with --force to override)`, ch.Printer.Format())
}

confirmationName := fmt.Sprintf("%s/%s/%s", database, branch, backup)
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/branch/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func DeleteCmd(ch *cmdutil.Helper) *cobra.Command {

if !force {
if ch.Printer.Format() != printer.Human {
return fmt.Errorf("cannot delete branch with the output format %q (run with --force to override)", ch.Printer.Format())
return fmt.Errorf(`cannot delete branch with the output format "%s" (run with --force to override)`, ch.Printer.Format())
}

if db.Kind == "mysql" {
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/database/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func DeleteCmd(ch *cmdutil.Helper) *cobra.Command {

if !force {
if ch.Printer.Format() != printer.Human {
return fmt.Errorf("cannot delete database with the output format %q (run with --force to override)", ch.Printer.Format())
return fmt.Errorf(`cannot delete database with the output format "%s" (run with --force to override)`, ch.Printer.Format())
}

if !printer.IsTTY {
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/password/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func DeleteCmd(ch *cmdutil.Helper) *cobra.Command {

if !force {
if ch.Printer.Format() != printer.Human {
return fmt.Errorf("cannot delete password with the output format %q (run with --force to override)", ch.Printer.Format())
return fmt.Errorf(`cannot delete password with the output format "%s" (run with --force to override)`, ch.Printer.Format())
}

var confirmationName string
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/role/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func DeleteCmd(ch *cmdutil.Helper) *cobra.Command {

if !flags.force {
if ch.Printer.Format() != printer.Human {
return fmt.Errorf("cannot delete role with the output format %q (run with --force to override)", ch.Printer.Format())
return fmt.Errorf(`cannot delete role with the output format "%s" (run with --force to override)`, ch.Printer.Format())
}

confirmationName := fmt.Sprintf("%s/%s/%s", database, branch, roleID)
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/role/reassign.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func ReassignCmd(ch *cmdutil.Helper) *cobra.Command {

if !flags.force {
if ch.Printer.Format() != printer.Human {
return fmt.Errorf("cannot reassign role objects with the output format %q (run with --force to override)", ch.Printer.Format())
return fmt.Errorf(`cannot reassign role objects with the output format "%s" (run with --force to override)`, ch.Printer.Format())
}

confirmationName := fmt.Sprintf("%s/%s/%s", database, branch, roleID)
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/role/reset.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func ResetCmd(ch *cmdutil.Helper) *cobra.Command {

if !flags.force {
if ch.Printer.Format() != printer.Human {
return fmt.Errorf("cannot reset role password with the output format %q (run with --force to override)", ch.Printer.Format())
return fmt.Errorf(`cannot reset role password with the output format "%s" (run with --force to override)`, ch.Printer.Format())
}

confirmationName := fmt.Sprintf("%s/%s/%s", database, branch, roleID)
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/role/reset_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func ResetDefaultCmd(ch *cmdutil.Helper) *cobra.Command {

if !flags.force {
if ch.Printer.Format() != printer.Human {
return fmt.Errorf("cannot delete password with the output format %q (run with --force to override)", ch.Printer.Format())
return fmt.Errorf(`cannot delete password with the output format "%s" (run with --force to override)`, ch.Printer.Format())
}

confirmationName := fmt.Sprintf("%s/%s", database, branch)
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/workflow/cancel.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ marks it as cancelled, allowing you to start a new workflow if needed.`,

if !force {
if ch.Printer.Format() != printer.Human {
return fmt.Errorf("cannot cancel workflow with the output format %q (run with --force to override)", ch.Printer.Format())
return fmt.Errorf(`cannot cancel workflow with the output format "%s" (run with --force to override)`, ch.Printer.Format())
}

if !printer.IsTTY {
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/workflow/cutover.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func CutoverCmd(ch *cmdutil.Helper) *cobra.Command {

if !force {
if ch.Printer.Format() != printer.Human {
return fmt.Errorf("cannot cutover with the output format %q (run with --force to override)", ch.Printer.Format())
return fmt.Errorf(`cannot cutover with the output format "%s" (run with --force to override)`, ch.Printer.Format())
}

if !printer.IsTTY {
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/workflow/switch_traffic.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ By default, this command will route all queries for primary, replica, and read-o

if !force {
if ch.Printer.Format() != printer.Human {
return fmt.Errorf("cannot switch query traffic with the output format %q (run with --force to override)", ch.Printer.Format())
return fmt.Errorf(`cannot switch query traffic with the output format "%s" (run with --force to override)`, ch.Printer.Format())
}

if !printer.IsTTY {
Expand Down
6 changes: 3 additions & 3 deletions internal/printer/printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ func NewFormatValue(val Format, p *Format) *Format {
return (*Format)(p)
}

func (f *Format) String() string {
switch *f {
func (f Format) String() string {
switch f {
case Human:
return "human"
case JSON:
Expand Down Expand Up @@ -199,7 +199,7 @@ func (p *Printer) PrintResource(v interface{}) error {

func (p *Printer) ConfirmCommand(confirmationName, commandShortName, confirmFailedName string) error {
if p.Format() != Human {
return fmt.Errorf("cannot %s with the output format %q (run with --force to override)", commandShortName, p.Format())
return fmt.Errorf(`cannot %s with the output format "%s" (run with --force to override)`, commandShortName, p.Format())
}

if !IsTTY {
Expand Down