fix: enable and disable remote links

This commit is contained in:
2018-11-28 12:32:34 +01:00
parent ac0aa0de5a
commit 42aa07802a
3 changed files with 106 additions and 2 deletions

24
cmd/remote/disable.go Normal file
View File

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

24
cmd/remote/enable.go Normal file
View File

@ -0,0 +1,24 @@
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)
}