Skip to content

Commit

Permalink
fix(core): move human package (#4360)
Browse files Browse the repository at this point in the history
  • Loading branch information
Laure-di authored Dec 16, 2024
1 parent 7e6e28a commit b12f43c
Show file tree
Hide file tree
Showing 105 changed files with 100 additions and 100 deletions.
2 changes: 1 addition & 1 deletion cmd/scw-wasm-tester/human.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/hashicorp/go-version"
"github.com/scaleway/scaleway-cli/v2/core"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
)

func wasmTestMarshalBuildInfo(_ js.Value, _ []js.Value) any {
Expand Down
2 changes: 1 addition & 1 deletion core/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"sort"
"strings"

"github.com/scaleway/scaleway-cli/v2/core/human"
"github.com/scaleway/scaleway-cli/v2/internal/alias"
"github.com/scaleway/scaleway-cli/v2/internal/human"
)

// Command represent a CLI command. From this higher level type we create Cobra command objects.
Expand Down
2 changes: 1 addition & 1 deletion core/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"strings"

"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
)

// CliError is an all-in-one error structure that can be used in commands to return useful errors to the user.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/alecthomas/assert"
"github.com/dustin/go-humanize"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
"github.com/scaleway/scaleway-sdk-go/scw"
)

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion core/printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"strings"
"text/template"

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

Expand Down
2 changes: 1 addition & 1 deletion core/result.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"

"github.com/fatih/color"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
"github.com/scaleway/scaleway-cli/v2/internal/interactive"
"github.com/scaleway/scaleway-cli/v2/internal/terminal"
"github.com/scaleway/scaleway-sdk-go/strcase"
Expand Down
2 changes: 1 addition & 1 deletion core/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
"time"

"github.com/hashicorp/go-version"
"github.com/scaleway/scaleway-cli/v2/core/human"
args "github.com/scaleway/scaleway-cli/v2/internal/args"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/internal/interactive"
"github.com/scaleway/scaleway-cli/v2/internal/platform/terminal"
"github.com/scaleway/scaleway-sdk-go/api/test/v1"
Expand Down
2 changes: 1 addition & 1 deletion core/view.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package core

import (
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
)

// View hydrates human.MarshalOpt
Expand Down
2 changes: 1 addition & 1 deletion internal/interactive/prompt.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/chzyer/readline"
"github.com/fatih/color"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
"github.com/scaleway/scaleway-cli/v2/internal/terminal"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/alias/alias_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/alecthomas/assert"
"github.com/scaleway/scaleway-cli/v2/commands"
"github.com/scaleway/scaleway-cli/v2/core"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
)

func Test_Alias(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/applesilicon/v1alpha1/custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package applesilicon

import (
"github.com/scaleway/scaleway-cli/v2/core"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
applesilicon "github.com/scaleway/scaleway-sdk-go/api/applesilicon/v1alpha1"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/applesilicon/v1alpha1/custom_os.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package applesilicon

import (
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
applesilicon "github.com/scaleway/scaleway-sdk-go/api/applesilicon/v1alpha1"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/applesilicon/v1alpha1/custom_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"github.com/fatih/color"
"github.com/scaleway/scaleway-cli/v2/core"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
applesilicon "github.com/scaleway/scaleway-sdk-go/api/applesilicon/v1alpha1"
"github.com/scaleway/scaleway-sdk-go/scw"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/fatih/color"
"github.com/scaleway/scaleway-cli/v2/core"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
applesilicon "github.com/scaleway/scaleway-sdk-go/api/applesilicon/v1alpha1"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/baremetal/v1/custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package baremetal

import (
"github.com/scaleway/scaleway-cli/v2/core"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
baremetal "github.com/scaleway/scaleway-sdk-go/api/baremetal/v1"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/baremetal/v1/custom_offer.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package baremetal

import (
"github.com/fatih/color"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
"github.com/scaleway/scaleway-sdk-go/api/baremetal/v1"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/baremetal/v1/custom_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/fatih/color"
"github.com/scaleway/scaleway-cli/v2/core"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
baremetal "github.com/scaleway/scaleway-sdk-go/api/baremetal/v1"
"github.com/scaleway/scaleway-sdk-go/logger"
"github.com/scaleway/scaleway-sdk-go/scw"
Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/billing/v2beta1/custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package billing
import (
"github.com/fatih/color"
"github.com/scaleway/scaleway-cli/v2/core"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
billing "github.com/scaleway/scaleway-sdk-go/api/billing/v2beta1"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/block/v1alpha1/custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package block
import (
"github.com/fatih/color"
"github.com/scaleway/scaleway-cli/v2/core"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
block "github.com/scaleway/scaleway-sdk-go/api/block/v1alpha1"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/container/v1beta1/custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package container

import (
"github.com/scaleway/scaleway-cli/v2/core"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
container "github.com/scaleway/scaleway-sdk-go/api/container/v1beta1"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/container/v1beta1/custom_container.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/fatih/color"
"github.com/scaleway/scaleway-cli/v2/core"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
container "github.com/scaleway/scaleway-sdk-go/api/container/v1beta1"
"github.com/scaleway/scaleway-sdk-go/scw"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/container/v1beta1/custom_cron.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package container

import (
"github.com/fatih/color"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
container "github.com/scaleway/scaleway-sdk-go/api/container/v1beta1"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/container/v1beta1/custom_namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/fatih/color"
"github.com/scaleway/scaleway-cli/v2/core"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
container "github.com/scaleway/scaleway-sdk-go/api/container/v1beta1"
"github.com/scaleway/scaleway-sdk-go/scw"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/documentdb/v1beta1/custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package documentdb
import (
"github.com/fatih/color"
"github.com/scaleway/scaleway-cli/v2/core"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
documentdb "github.com/scaleway/scaleway-sdk-go/api/documentdb/v1beta1"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/domain/v2beta1/custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package domain

import (
"github.com/scaleway/scaleway-cli/v2/core"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
domain "github.com/scaleway/scaleway-sdk-go/api/domain/v2beta1"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/domain/v2beta1/custom_certificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package domain

import (
"github.com/fatih/color"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
domain "github.com/scaleway/scaleway-sdk-go/api/domain/v2beta1"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/domain/v2beta1/custom_zone.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package domain

import (
"github.com/fatih/color"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
domain "github.com/scaleway/scaleway-sdk-go/api/domain/v2beta1"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/feedback/issue.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"runtime"

"github.com/scaleway/scaleway-cli/v2/core"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
)

const githubURL = "https://github.com/scaleway/scaleway-cli/issues/new"
Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/flexibleip/v1alpha1/custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package flexibleip

import (
"github.com/scaleway/scaleway-cli/v2/core"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
fip "github.com/scaleway/scaleway-sdk-go/api/flexibleip/v1alpha1"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/flexibleip/v1alpha1/custom_ip.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/fatih/color"
"github.com/scaleway/scaleway-cli/v2/core"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
flexibleip "github.com/scaleway/scaleway-sdk-go/api/flexibleip/v1alpha1"
"github.com/scaleway/scaleway-sdk-go/scw"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/flexibleip/v1alpha1/custom_mac.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package flexibleip

import (
"github.com/fatih/color"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
flexibleip "github.com/scaleway/scaleway-sdk-go/api/flexibleip/v1alpha1"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/function/v1beta1/custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package function

import (
"github.com/scaleway/scaleway-cli/v2/core"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
function "github.com/scaleway/scaleway-sdk-go/api/function/v1beta1"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/function/v1beta1/custom_cron.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package function

import (
"github.com/fatih/color"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
function "github.com/scaleway/scaleway-sdk-go/api/function/v1beta1"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/function/v1beta1/custom_function.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package function

import (
"github.com/fatih/color"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
function "github.com/scaleway/scaleway-sdk-go/api/function/v1beta1"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/function/v1beta1/custom_namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package function

import (
"github.com/fatih/color"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
function "github.com/scaleway/scaleway-sdk-go/api/function/v1beta1"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/iam/v1alpha1/custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (

"github.com/fatih/color"
"github.com/scaleway/scaleway-cli/v2/core"
"github.com/scaleway/scaleway-cli/v2/core/human"
"github.com/scaleway/scaleway-cli/v2/internal/args"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/internal/interactive"
iam "github.com/scaleway/scaleway-sdk-go/api/iam/v1alpha1"
"github.com/scaleway/scaleway-sdk-go/scw"
Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/inference/v1beta1/custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package inference

import (
"github.com/scaleway/scaleway-cli/v2/core"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
inference "github.com/scaleway/scaleway-sdk-go/api/inference/v1beta1"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/inference/v1beta1/custom_deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/fatih/color"
"github.com/scaleway/scaleway-cli/v2/core"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
inference "github.com/scaleway/scaleway-sdk-go/api/inference/v1beta1"
"github.com/scaleway/scaleway-sdk-go/scw"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/inference/v1beta1/custom_model.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package inference

import (
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
inference "github.com/scaleway/scaleway-sdk-go/api/inference/v1beta1"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/inference/v1beta1/custom_node_type.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package inference

import (
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
inference "github.com/scaleway/scaleway-sdk-go/api/inference/v1beta1"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/info/custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"reflect"

"github.com/scaleway/scaleway-cli/v2/core"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
"github.com/scaleway/scaleway-sdk-go/scw"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/instance/v1/custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"reflect"

"github.com/scaleway/scaleway-cli/v2/core"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
"github.com/scaleway/scaleway-sdk-go/api/instance/v1"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/instance/v1/custom_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/fatih/color"
"github.com/scaleway/scaleway-cli/v2/core"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
block "github.com/scaleway/scaleway-sdk-go/api/block/v1alpha1"
"github.com/scaleway/scaleway-sdk-go/api/instance/v1"
"github.com/scaleway/scaleway-sdk-go/scw"
Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/instance/v1/custom_privatenics.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/fatih/color"
"github.com/scaleway/scaleway-cli/v2/core"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-cli/v2/core/human"
"github.com/scaleway/scaleway-sdk-go/api/instance/v1"
)

Expand Down
Loading

0 comments on commit b12f43c

Please sign in to comment.