go fmt & update per feedback

This commit is contained in:
Matti R 2020-03-02 13:59:32 -05:00
parent b0f0de3dde
commit b6044120ef
No known key found for this signature in database
GPG Key ID: 9D8A57ADAA232E95
6 changed files with 24 additions and 24 deletions

View File

@ -34,21 +34,19 @@ var (
} }
cmdConfigInteractive cli.Command = cli.Command{ cmdConfigInteractive cli.Command = cli.Command{
Name: "interactive", Name: "start",
Aliases: []string{"i"},
Usage: "Interactive configuration process", Usage: "Interactive configuration process",
Action: interactiveConfigAction, Action: interactiveConfigAction,
Flags: []cli.Flag{ Flags: []cli.Flag{
&cli.StringFlag{ &cli.StringFlag{
Name: "sections", Name: "sections",
Value: "server db app", Value: "server db app",
Usage: "Which sections of the configuration to go through (requires --config)\n" + Usage: "Which sections of the configuration to go through\n" +
"valid values are any combination of 'server', 'db' and 'app' \n" + "valid values of sections flag are any combination of 'server', 'db' and 'app' \n" +
"example: writefreely --config --sections \"db app\"", "example: writefreely config start --sections \"db app\"",
}, },
}, },
} }
) )
func genConfigAction(c *cli.Context) error { func genConfigAction(c *cli.Context) error {

View File

@ -31,7 +31,6 @@ var (
Usage: "Generate encryption and authentication keys", Usage: "Generate encryption and authentication keys",
Action: genKeysAction, Action: genKeysAction,
} }
) )
func genKeysAction(c *cli.Context) error { func genKeysAction(c *cli.Context) error {

View File

@ -23,6 +23,9 @@ import (
) )
func main() { func main() {
cli.VersionPrinter = func(c *cli.Context) {
fmt.Printf("%s\n", c.App.Version)
}
app := &cli.App{ app := &cli.App{
Name: "WriteFreely", Name: "WriteFreely",
Usage: "A beautifully pared-down blogging platform", Usage: "A beautifully pared-down blogging platform",

View File

@ -29,9 +29,9 @@ var (
} }
cmdAddUser cli.Command = cli.Command{ cmdAddUser cli.Command = cli.Command{
Name: "add", Name: "create",
Usage: "Add new user", Usage: "Add new user",
Aliases: []string{"a"}, Aliases: []string{"a", "add"},
Flags: []cli.Flag{ Flags: []cli.Flag{
&cli.BoolFlag{ &cli.BoolFlag{
Name: "admin", Name: "admin",