Skip to content
Draft
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
4 changes: 2 additions & 2 deletions core/printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"strings"
"text/template"

"github.com/goccy/go-yaml"
"github.com/scaleway/scaleway-cli/v2/core/human"
"github.com/scaleway/scaleway-cli/v2/internal/gofields"
"gopkg.in/yaml.v3"
)

// Type defines an formatter format.
Expand Down Expand Up @@ -292,7 +292,7 @@ func (p *Printer) printJSON(data any) error {
}

func (p *Printer) printYAML(data any) error {
_, implementMarshaler := data.(yaml.Marshaler)
_, implementMarshaler := data.(yaml.BytesMarshaler)
err, isError := data.(error)

if isError && !implementMarshaler {
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require (
github.com/dustin/go-humanize v1.0.1
github.com/fatih/color v1.18.0
github.com/getsentry/sentry-go v0.39.0
github.com/ghodss/yaml v1.0.0
github.com/goccy/go-yaml v1.18.0
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674
github.com/hashicorp/go-version v1.7.0
github.com/karrick/tparse/v2 v2.8.2
Expand All @@ -32,7 +32,6 @@ require (
golang.org/x/sync v0.18.0
golang.org/x/term v0.37.0
golang.org/x/text v0.31.0
gopkg.in/yaml.v3 v3.0.1
)

require (
Expand Down Expand Up @@ -212,6 +211,7 @@ require (
gopkg.in/dnaeon/go-vcr.v4 v4.0.6 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
gotest.tools/gotestsum v1.12.3 // indirect
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,6 @@ github.com/gdamore/tcell/v2 v2.9.0 h1:N6t+eqK7/xwtRPwxzs1PXeRWnm0H9l02CrgJ7DLn1y
github.com/gdamore/tcell/v2 v2.9.0/go.mod h1:8/ZoqM9rxzYphT9tH/9LnunhV9oPBqwS8WHGYm5nrmo=
github.com/getsentry/sentry-go v0.39.0 h1:uhnexj8PNCyCve37GSqxXOeXHh4cJNLNNB4w70Jtgo0=
github.com/getsentry/sentry-go v0.39.0/go.mod h1:eRXCoh3uvmjQLY6qu63BjUZnaBu5L5WhMV1RwYO8W5s=
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/gliderlabs/ssh v0.3.8 h1:a4YXD1V7xMF9g5nTkdfnja3Sxy1PVDCj1Zg4Wb8vY6c=
github.com/gliderlabs/ssh v0.3.8/go.mod h1:xYoytBv1sV0aL3CavoDuJIQNURXkkfPA/wxQ1pL1fAU=
github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA=
Expand All @@ -260,6 +258,8 @@ github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs=
github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
github.com/goccy/go-yaml v1.18.0 h1:8W7wMFS12Pcas7KU+VVkaiCng+kG8QiFeFwzFb+rwuw=
github.com/goccy/go-yaml v1.18.0/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA=
github.com/gofrs/flock v0.13.0 h1:95JolYOvGMqeH31+FC7D2+uULf6mG61mEZ/A8dRYMzw=
github.com/gofrs/flock v0.13.0/go.mod h1:jxeyy9R1auM5S6JYDBhDt+E2TCo7DkratH4Pgi8P+Z0=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
Expand Down
2 changes: 1 addition & 1 deletion internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"runtime"
"text/template"

"github.com/goccy/go-yaml"
"github.com/scaleway/scaleway-cli/v2/internal/alias"
"github.com/scaleway/scaleway-sdk-go/scw"
"gopkg.in/yaml.v3"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion internal/editor/marshal.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"strings"

"github.com/ghodss/yaml"
"github.com/goccy/go-yaml"
)

type MarshalMode = string
Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/k8s/v1/custom_kubeconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"runtime"
"strings"

"github.com/ghodss/yaml"
"github.com/goccy/go-yaml"
"github.com/scaleway/scaleway-cli/v2/core"
api "github.com/scaleway/scaleway-cli/v2/internal/namespaces/k8s/v1/types"
"github.com/scaleway/scaleway-sdk-go/scw"
Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/k8s/v1/custom_kubeconfig_get.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"reflect"

"github.com/ghodss/yaml"
"github.com/goccy/go-yaml"
"github.com/scaleway/scaleway-cli/v2/core"
api "github.com/scaleway/scaleway-cli/v2/internal/namespaces/k8s/v1/types"
k8s "github.com/scaleway/scaleway-sdk-go/api/k8s/v1"
Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/k8s/v1/custom_kubeconfig_get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"regexp"
"testing"

"github.com/ghodss/yaml"
"github.com/goccy/go-yaml"
"github.com/scaleway/scaleway-cli/v2/core"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/k8s/v1"
api "github.com/scaleway/scaleway-cli/v2/internal/namespaces/k8s/v1/types"
Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/k8s/v1/custom_kubeconfig_install.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"reflect"

"github.com/ghodss/yaml"
"github.com/goccy/go-yaml"
"github.com/scaleway/scaleway-cli/v2/core"
api "github.com/scaleway/scaleway-cli/v2/internal/namespaces/k8s/v1/types"
k8s "github.com/scaleway/scaleway-sdk-go/api/k8s/v1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
"testing"

"github.com/ghodss/yaml"
"github.com/goccy/go-yaml"
"github.com/scaleway/scaleway-cli/v2/core"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/k8s/v1"
api "github.com/scaleway/scaleway-cli/v2/internal/namespaces/k8s/v1/types"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
"testing"

"github.com/ghodss/yaml"
"github.com/goccy/go-yaml"
"github.com/scaleway/scaleway-cli/v2/core"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/k8s/v1"
api "github.com/scaleway/scaleway-cli/v2/internal/namespaces/k8s/v1/types"
Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/k8s/v1/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"path"
"strings"

"github.com/ghodss/yaml"
"github.com/goccy/go-yaml"
"github.com/scaleway/scaleway-cli/v2/core"
go_api "github.com/scaleway/scaleway-cli/v2/internal/namespaces/k8s/v1/types"
k8s "github.com/scaleway/scaleway-sdk-go/api/k8s/v1"
Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/lb/v1/helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
"time"

"github.com/ghodss/yaml"
"github.com/goccy/go-yaml"
"github.com/scaleway/scaleway-cli/v2/core"
go_api "github.com/scaleway/scaleway-cli/v2/internal/namespaces/k8s/v1/types"
"github.com/scaleway/scaleway-sdk-go/api/k8s/v1"
Expand Down
Loading