go-pass-gen/app/root.go
2022-06-08 23:42:38 +02:00

27 lines
572 B
Go
Raw Permalink 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 app defines the command-line interface to passgen
package app
import (
"log"
"os"
"github.com/spf13/cobra"
)
// 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)
}
}