finishing sqlite changes
- finished default/active server logic - dev done - needs testing
This commit is contained in:
11
cmd/init.go
11
cmd/init.go
@@ -9,12 +9,9 @@ import (
|
||||
)
|
||||
|
||||
var initCmd = &cobra.Command{
|
||||
Use: "init",
|
||||
Example: "mctl init",
|
||||
SilenceUsage: true,
|
||||
// Short: "Login to server and send commands",
|
||||
// Long: `Login to default server and enter command loop. The default server
|
||||
// is used unless the server flag is set`,
|
||||
Use: "init",
|
||||
Example: "mctl init",
|
||||
Short: "initializes the database tables, must be run before mctl can be used",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
db, err := database.New()
|
||||
cobra.CheckErr(err)
|
||||
@@ -26,5 +23,5 @@ var initCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(loginCmd)
|
||||
rootCmd.AddCommand(initCmd)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user