-
Notifications
You must be signed in to change notification settings - Fork 10
/
init.go
41 lines (33 loc) · 885 Bytes
/
init.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package command
import (
"fmt"
"strings"
"github.com/spf13/cobra"
)
const (
cmdInitApp = "baur init app"
cmdInitBashComp = "baur init bashcomp"
cmdInitDb = "baur init db"
cmdInitRepo = "baur init repo"
)
var initLongHelp = fmt.Sprintf(`
The init commands initialize baur configuration files,
create baur tables in the database or install bash completion files.
To setup baur for the first time, the following commands should be run:
1.) %s
2.) %s
Optional: %s
Afterwards application configuration files can be created with the
'%s' command.
`, highlight(cmdInitRepo),
highlight(cmdInitDb),
highlight(cmdInitBashComp),
highlight(cmdInitApp))
var initCmd = &cobra.Command{
Use: "init",
Short: "initialize configuration files, the baur database, bashcompletion",
Long: strings.TrimSpace(initLongHelp),
}
func init() {
rootCmd.AddCommand(initCmd)
}