created nonfunctional init command
This commit is contained in:
12
chub/init.go
12
chub/init.go
@@ -1 +1,11 @@
|
||||
package init
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func initCommand(guid string) {
|
||||
|
||||
fmt.Printf("initializing %v\n", guid)
|
||||
|
||||
}
|
||||
|
||||
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>")
|
||||
}
|
||||
|
||||
0
chub/util/slices.go
Normal file
0
chub/util/slices.go
Normal file
Reference in New Issue
Block a user