File tree Expand file tree Collapse file tree 3 files changed +22
-2
lines changed Expand file tree Collapse file tree 3 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 11package namespaces
22
33import (
4+ "os"
5+
46 "github.com/scaleway/scaleway-cli/v2/internal/core"
57 accountv2 "github.com/scaleway/scaleway-cli/v2/internal/namespaces/account/v2"
68 account "github.com/scaleway/scaleway-cli/v2/internal/namespaces/account/v2alpha1"
@@ -19,6 +21,7 @@ import (
1921 initNamespace "github.com/scaleway/scaleway-cli/v2/internal/namespaces/init"
2022 "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1"
2123 "github.com/scaleway/scaleway-cli/v2/internal/namespaces/iot/v1"
24+ ipfs "github.com/scaleway/scaleway-cli/v2/internal/namespaces/ipfs/v1alpha1"
2225 "github.com/scaleway/scaleway-cli/v2/internal/namespaces/k8s/v1"
2326 "github.com/scaleway/scaleway-cli/v2/internal/namespaces/lb/v1"
2427 "github.com/scaleway/scaleway-cli/v2/internal/namespaces/marketplace/v2"
@@ -34,6 +37,8 @@ import (
3437 "github.com/scaleway/scaleway-cli/v2/internal/namespaces/vpcgw/v1"
3538)
3639
40+ var labs = os .Getenv ("SCW_LABS" ) == "true"
41+
3742// GetCommands returns a list of all commands in the CLI.
3843// It is used by both scw and scw-qa.
3944// We can not put it in `core` package as it would result in a import cycle `core` -> `namespaces/autocomplete` -> `core`.
@@ -72,6 +77,9 @@ func GetCommands(beta ...bool) *core.Commands {
7277 tem .GetCommands (),
7378 mnq .GetCommands (),
7479 )
80+ if labs {
81+ commands .Merge (ipfs .GetCommands ())
82+ }
7583
7684 return commands
7785}
Original file line number Diff line number Diff line change 1+ package ipfs
2+
3+ import (
4+ "github.com/scaleway/scaleway-cli/v2/internal/core"
5+ )
6+
7+ // GetCommands returns the list of commands for the 'ipfs' namespace.
8+ func GetCommands () * core.Commands {
9+ cmds := GetGeneratedCommands ()
10+
11+ return cmds
12+ }
Original file line number Diff line number Diff line change @@ -5,11 +5,11 @@ package ipfs
55
66import (
77 "context"
8- "reflect"
9-
108 "github.com/scaleway/scaleway-cli/v2/internal/core"
119 "github.com/scaleway/scaleway-sdk-go/api/ipfs/v1alpha1"
1210 "github.com/scaleway/scaleway-sdk-go/scw"
11+
12+ "reflect"
1313)
1414
1515// always import dependencies
You can’t perform that action at this time.
0 commit comments