File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 1
1
package commands
2
2
3
3
import (
4
- file "github.com/scaleway/scaleway-cli/v2/internal/namespaces/file/v1alpha1"
5
4
"os"
6
5
7
6
"github.com/scaleway/scaleway-cli/v2/core"
@@ -21,6 +20,7 @@ import (
21
20
domain "github.com/scaleway/scaleway-cli/v2/internal/namespaces/domain/v2beta1"
22
21
edgeservices "github.com/scaleway/scaleway-cli/v2/internal/namespaces/edge_services/v1beta1"
23
22
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/feedback"
23
+ file "github.com/scaleway/scaleway-cli/v2/internal/namespaces/file/v1alpha1"
24
24
flexibleip "github.com/scaleway/scaleway-cli/v2/internal/namespaces/flexibleip/v1alpha1"
25
25
function "github.com/scaleway/scaleway-cli/v2/internal/namespaces/function/v1beta1"
26
26
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/help"
@@ -113,11 +113,13 @@ func GetCommands() *core.Commands {
113
113
mongodb .GetCommands (),
114
114
audit_trail .GetCommands (),
115
115
interlink .GetCommands (),
116
- file .GetCommands (),
117
116
)
118
117
119
118
if beta {
120
- commands .Merge (dedibox .GetCommands ())
119
+ commands .MergeAll (
120
+ dedibox .GetCommands (),
121
+ file .GetCommands (),
122
+ )
121
123
}
122
124
123
125
return commands
Original file line number Diff line number Diff line change @@ -291,6 +291,12 @@ func (c *Commands) Merge(cmds *Commands) {
291
291
}
292
292
}
293
293
294
+ func (c * Commands ) MergeAll (cmds ... * Commands ) {
295
+ for _ , command := range cmds {
296
+ c .Merge (command )
297
+ }
298
+ }
299
+
294
300
func (c * Commands ) GetAll () []* Command {
295
301
return c .commands
296
302
}
You can’t perform that action at this time.
0 commit comments