26 lines
319 B
Go
26 lines
319 B
Go
package cmd
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var (
|
|
addCmd = &cobra.Command{
|
|
Short: "Add note to depository",
|
|
Use: "add [note]",
|
|
Run: addNote,
|
|
}
|
|
)
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(addCmd)
|
|
}
|
|
|
|
func addNote(cmd *cobra.Command, args []string) {
|
|
// open new note in $EDITOR
|
|
|
|
fmt.Println(args)
|
|
}
|