PKGBUILD/cmd/remote/enable.go

25 lines
424 B
Go

package remote
import (
"log"
"git.cryptic.systems/fh-trier/go-flucky/pkg/remote"
"github.com/spf13/cobra"
)
var enableRemoteCmd = &cobra.Command{
Use: "enable",
Short: "Enable Remove Server",
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
if err := remote.Enable(args[0], configDir); err != nil {
log.Fatal(err)
}
},
}
func init() {
remoteCmd.AddCommand(enableRemoteCmd)
}