short descriptions
This commit is contained in:
parent
2068f76c21
commit
427c863d1f
@ -26,7 +26,7 @@ import (
|
||||
// edCmd represents the ed command
|
||||
var edCmd = &cobra.Command{
|
||||
Use: "ed",
|
||||
Short: "A brief description of your command",
|
||||
Short: "Edit a todo",
|
||||
Long: `A longer description that spans multiple lines and likely contains examples
|
||||
and usage of using your command. For example:
|
||||
|
||||
|
@ -29,7 +29,7 @@ import (
|
||||
// lsCmd represents the ls command
|
||||
var lsCmd = &cobra.Command{
|
||||
Use: "ls",
|
||||
Short: "A brief description of your command",
|
||||
Short: "List todos",
|
||||
Long: `A longer description that spans multiple lines and likely contains examples
|
||||
and usage of using your command. For example:
|
||||
|
||||
@ -59,7 +59,6 @@ to quickly create a Cobra application.`,
|
||||
comp = '✓'
|
||||
}
|
||||
t.AppendRow([]interface{}{todo.ID, desc, date, string(comp)})
|
||||
// data[i] = []string{strconv.FormatUint(todo.ID, 10), todo.Desc, todo.DueDate.Format("")}
|
||||
}
|
||||
t.SetStyle(table.StyleLight)
|
||||
t.SetAllowedRowLength(cols)
|
||||
|
@ -17,7 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
@ -26,7 +25,7 @@ import (
|
||||
// rootCmd represents the base command when called without any subcommands
|
||||
var rootCmd = &cobra.Command{
|
||||
Use: "todo",
|
||||
Short: "A brief description of your application",
|
||||
Short: "Minimal todo app",
|
||||
Long: `A longer description that spans multiple lines and likely contains
|
||||
examples and usage of using your application. For example:
|
||||
|
||||
@ -35,9 +34,7 @@ This application is a tool to generate the needed files
|
||||
to quickly create a Cobra application.`,
|
||||
// Uncomment the following line if your bare application
|
||||
// has an action associated with it:
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
fmt.Println("test")
|
||||
},
|
||||
Run: lsCmd.Run,
|
||||
}
|
||||
|
||||
// Execute adds all child commands to the root command and sets flags appropriately.
|
||||
@ -60,5 +57,3 @@ func init() {
|
||||
// when this action is called directly.
|
||||
// rootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user