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 go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ require (
github.com/mattn/go-colorable v0.1.2 // indirect
github.com/mattn/go-isatty v0.0.9
github.com/pkg/errors v0.9.1 // indirect
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.5.0.20200130170711-05d27d10a3b8
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.5.0.20200211104822-047c88bb15c4
github.com/sergi/go-diff v1.0.0 // indirect
github.com/spf13/cobra v0.0.5
github.com/spf13/pflag v1.0.5
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNue
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.5.0.20200130170711-05d27d10a3b8 h1:+y+U0MHG110iL4TkTKEb3Wh07OK7ALY2XbNFxeAEb80=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.5.0.20200130170711-05d27d10a3b8/go.mod h1:CJJ5VAbozOl0yEw7nHB9+7BXTJbIn6h7W+f6Gau5IP8=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.5.0.20200211104822-047c88bb15c4 h1:7MhGZPXmbEqx97kIrBA7Xen1obsqQPnR0HKErxh76S4=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.5.0.20200211104822-047c88bb15c4/go.mod h1:CJJ5VAbozOl0yEw7nHB9+7BXTJbIn6h7W+f6Gau5IP8=
github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ hair-count 0
is-happy false
eyes-color unknown
status stopped
name
region fr-par
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ hair-count 9223372036854775808
is-happy true
eyes-color amber
status stopped
name
region fr-par
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ hair-count 9223372036854775809
is-happy true
eyes-color blue
status stopped
name
region fr-par
1 change: 1 addition & 0 deletions internal/e2e/testdata/test-human-get-simple.stdout.golden
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ hair-count 9223372036854775809
is-happy true
eyes-color blue
status stopped
name
region fr-par
8 changes: 4 additions & 4 deletions internal/e2e/testdata/test-human-list-simple.stdout.golden
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ID ORGANIZATION ID CREATED AT UPDATED AT HEIGHT SHOE SIZE ALTITUDE IN METER ALTITUDE IN MILLIMETER FINGERS COUNT HAIR COUNT IS HAPPY EYES COLOR STATUS REGION
0194fdc2-fa2f-fcc0-41d3-ff12045b73c8 11111111-1111-1111-1111-111111111111 few seconds ago few seconds ago 0 0 0 0 0 0 false unknown stopped fr-par
62a5eee8-2abd-f44a-2d0b-75fb180daf48 11111111-1111-1111-1111-111111111111 few seconds ago few seconds ago 0 0 0 0 0 0 false unknown stopped fr-par
39465185-0fd4-a178-892e-e285ece15114 11111111-1111-1111-1111-111111111111 few seconds ago few seconds ago 0 0 0 0 0 0 false unknown stopped fr-par
ID ORGANIZATION ID CREATED AT UPDATED AT HEIGHT SHOE SIZE ALTITUDE IN METER ALTITUDE IN MILLIMETER FINGERS COUNT HAIR COUNT IS HAPPY EYES COLOR STATUS NAME REGION
0194fdc2-fa2f-fcc0-41d3-ff12045b73c8 11111111-1111-1111-1111-111111111111 few seconds ago few seconds ago 0 0 0 0 0 0 false unknown stopped fr-par
62a5eee8-2abd-f44a-2d0b-75fb180daf48 11111111-1111-1111-1111-111111111111 few seconds ago few seconds ago 0 0 0 0 0 0 false unknown stopped fr-par
39465185-0fd4-a178-892e-e285ece15114 11111111-1111-1111-1111-111111111111 few seconds ago few seconds ago 0 0 0 0 0 0 false unknown stopped fr-par
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ hair-count 9223372036854775809
is-happy true
eyes-color blue
status stopped
name
region fr-par
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ hair-count 9223372036854775808
is-happy false
eyes-color amber
status stopped
name
region fr-par
2 changes: 1 addition & 1 deletion internal/matomo/matomo.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,5 +117,5 @@ func IsTelemetryDisabled() bool {
if err != nil {
return false
}
return !config.SendUsage
return !config.SendTelemetry
}
14 changes: 7 additions & 7 deletions internal/namespaces/init/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ type initArgs struct {
Region scw.Region
Zone scw.Zone
OrganizationID string
SendUsage *bool
SendTelemetry *bool
InstallAutocomplete *bool
}

Expand Down Expand Up @@ -191,22 +191,22 @@ func initCommand() *core.Command {
}

// Ask for send usage permission
if args.SendUsage == nil {
if args.SendTelemetry == nil {
_, _ = interactive.Println()
_, _ = interactive.PrintlnWithoutIndent(`
To improve this tool we rely on diagnostic and usage data.
Sending such data is optional and can be disable at any time by running "scw config set send_usage false"
Sending such data is optional and can be disable at any time by running "scw config set send_telemetry false"
`)

sendUsage, err := interactive.PromptBoolWithConfig(&interactive.PromptBoolConfig{
sendTelemetry, err := interactive.PromptBoolWithConfig(&interactive.PromptBoolConfig{
Prompt: "Do you want to send usage statistics and diagnostics?",
DefaultValue: true,
})
if err != nil {
return err
}

args.SendUsage = scw.BoolPtr(sendUsage)
args.SendTelemetry = scw.BoolPtr(sendTelemetry)
}

// Ask whether we should install autocomplete
Expand Down Expand Up @@ -240,8 +240,8 @@ func initCommand() *core.Command {
interactive.Printf("Creating new config at %v\n", scw.GetConfigPath())
}

if args.SendUsage != nil {
config.SendUsage = *args.SendUsage
if args.SendTelemetry != nil {
config.SendTelemetry = *args.SendTelemetry
}

// Update active profile
Expand Down