Refactor
Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
This commit is contained in:
parent
665ef94ca9
commit
a3202aaff3
17 changed files with 63 additions and 56 deletions
|
@ -1,24 +0,0 @@
|
|||
package cmd
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"code.oliverdavies.uk/opdavies/cmd-zet/internal/zet"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var createCmd = &cobra.Command{
|
||||
Use: "create",
|
||||
Aliases: []string{"c", "n", "new"},
|
||||
Short: "Create a new zettel",
|
||||
Long: `zet create|new|c|n TITLE`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
title := ""
|
||||
|
||||
if len(args) > 0 {
|
||||
title = strings.Join(args, " ")
|
||||
}
|
||||
|
||||
zet.CreateZet(title)
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue