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