forgot connect.go
This commit is contained in:
parent
61b665af13
commit
b07acdf5c8
1 changed files with 28 additions and 0 deletions
28
cmd/kubelwagen/connect.go
Normal file
28
cmd/kubelwagen/connect.go
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"os"
|
||||||
|
|
||||||
|
"github.com/barakmich/kubelwagen/client"
|
||||||
|
"github.com/spf13/cobra"
|
||||||
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
rootCmd.AddCommand(connectCmd)
|
||||||
|
}
|
||||||
|
|
||||||
|
var connectCmd = &cobra.Command{
|
||||||
|
Use: "connect HOSTPORT DIR",
|
||||||
|
Short: "Mount DIR to the FUSE kubelwagen at HOSTPORT",
|
||||||
|
Run: connectRun,
|
||||||
|
}
|
||||||
|
|
||||||
|
func connectRun(cmd *cobra.Command, args []string) {
|
||||||
|
if len(args) != 2 {
|
||||||
|
cmd.Usage()
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
hostport := args[0]
|
||||||
|
dir := args[1]
|
||||||
|
client.Connect(hostport, dir)
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue