go-pass-gen/cmd/root.go
2021-10-20 17:30:41 +02:00

26 lines
571 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Package cmd defines the command-line interface to passgen
package cmd
import (
"github.com/spf13/cobra"
"log"
"os"
)
// rootCommand initializes the command-line interface application.
var rootCommand = &cobra.Command{
Use: "passgen",
Short: "PassGen",
Long: "Password Generator",
Run: func(cmd *cobra.Command, args []string) {
display("** passgen v0.0.1 **\nUse passgen -h for more information")
},
}
// Execute is where the fun actually happens.
func Execute() {
if err := rootCommand.Execute(); err != nil {
log.Println(err)
os.Exit(1)
}
}