created nonfunctional init command
This commit is contained in:
26
chub/main.go
26
chub/main.go
@@ -1,7 +1,29 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
||||
|
||||
func main() {
|
||||
fmt.Println("I am going to eat all the configuration I can!")
|
||||
|
||||
if len(os.Args[1:]) < 2 {
|
||||
usage()
|
||||
return
|
||||
}
|
||||
|
||||
command := os.Args[1]
|
||||
switch {
|
||||
case command == "init":
|
||||
machineId := os.Args[2]
|
||||
initCommand(machineId)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func usage() {
|
||||
fmt.Println("Configuration Hub v0.1")
|
||||
fmt.Println("")
|
||||
fmt.Println("Usage:")
|
||||
fmt.Println("\tchub init <machine-uuid> - connects your server to the config hub machine id <machine-uiid>")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user