format readme

This commit is contained in:
Roberto Hidalgo 2023-01-17 20:48:38 -06:00
parent a14ffd07b9
commit 087a978a8c

View File

@ -7,7 +7,7 @@ package main
import ( import (
"os" "os"
"fmt", "fmt"
"git.rob.mx/nidito/chinampa" "git.rob.mx/nidito/chinampa"
"git.rob.mx/nidito/chinampa/pkg/command" "git.rob.mx/nidito/chinampa/pkg/command"
@ -18,22 +18,22 @@ import (
func main() { func main() {
chinampa.Register(&command.Command{ chinampa.Register(&command.Command{
Path: []string{"something"}, Path: []string{"something"},
Summary: "does something", Summary: "does something",
Description: "a longer description of how it does stuff", Description: "a longer description of how it does stuff",
Arguments: command.Arguments{ Arguments: command.Arguments{
{ {
Name: "argument zero", Name: "argument zero",
Description: "a help text for using argument zero", Description: "a help text for using argument zero",
Required: true, Required: true,
}, },
}, },
Action: func(cmd *command.Command) error { Action: func(cmd *command.Command) error {
someArg := cmd.Arguments[0].ToValue().(string) someArg := cmd.Arguments[0].ToValue().(string)
return fmt.Errorf("Don't know how to do stuff with %s", someArg) return fmt.Errorf("Don't know how to do stuff with %s", someArg)
}, },
}) })
logrus.SetFormatter(&logrus.TextFormatter{ logrus.SetFormatter(&logrus.TextFormatter{
DisableLevelTruncation: true, DisableLevelTruncation: true,