mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-23 13:30:14 -05:00
24 lines
388 B
Go
24 lines
388 B
Go
package register
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
|
|
"github.com/opencloud-eu/opencloud/pkg/config"
|
|
)
|
|
|
|
var (
|
|
// Commands define the slice of commands.
|
|
Commands []Command
|
|
)
|
|
|
|
// Command defines the register command.
|
|
type Command func(*config.Config) *cobra.Command
|
|
|
|
// AddCommand appends a command to Commands.
|
|
func AddCommand(cmd Command) {
|
|
Commands = append(
|
|
Commands,
|
|
cmd,
|
|
)
|
|
}
|