fix: enable and disable remote links
This commit is contained in:
24
cmd/remote/disable.go
Normal file
24
cmd/remote/disable.go
Normal 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
24
cmd/remote/enable.go
Normal 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)
|
||||
}
|
Reference in New Issue
Block a user