Skip to content

Commit b5e09b2

Browse files
committed
add support in beta version
1 parent 774e36e commit b5e09b2

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

commands/commands.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,13 @@ func GetCommands() *core.Commands {
113113
mongodb.GetCommands(),
114114
audit_trail.GetCommands(),
115115
interlink.GetCommands(),
116-
file.GetCommands(),
117116
)
118117

119118
if beta {
120-
commands.Merge(dedibox.GetCommands())
119+
commands.MergeAll(
120+
dedibox.GetCommands(),
121+
file.GetCommands(),
122+
)
121123
}
122124

123125
return commands

core/command.go

+6
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,12 @@ func (c *Commands) Merge(cmds *Commands) {
291291
}
292292
}
293293

294+
func (c *Commands) MergeAll(cmds ...*Commands) {
295+
for _, command := range cmds {
296+
c.Merge(command)
297+
}
298+
}
299+
294300
func (c *Commands) GetAll() []*Command {
295301
return c.commands
296302
}

0 commit comments

Comments
 (0)