mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-21 20:39:58 -05:00
23 lines
392 B
Go
23 lines
392 B
Go
package register
|
|
|
|
import (
|
|
"github.com/opencloud-eu/opencloud/pkg/config"
|
|
"github.com/urfave/cli/v2"
|
|
)
|
|
|
|
var (
|
|
// Commands defines the slice of commands.
|
|
Commands = []Command{}
|
|
)
|
|
|
|
// Command defines the register command.
|
|
type Command func(*config.Config) *cli.Command
|
|
|
|
// AddCommand appends a command to Commands.
|
|
func AddCommand(cmd Command) {
|
|
Commands = append(
|
|
Commands,
|
|
cmd,
|
|
)
|
|
}
|