mirror of
https://github.com/davidallendj/opaal.git
synced 2025-12-20 03:27:02 -07:00
Added CLI and more functionality
This commit is contained in:
parent
c04107cf3d
commit
053095c412
12 changed files with 199 additions and 92 deletions
28
cmd/root.go
Normal file
28
cmd/root.go
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
package cmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var configPath = ""
|
||||
var rootCmd = &cobra.Command{
|
||||
Use: "oidc",
|
||||
Short: "An experimental OIDC helper tool for handling logins",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
func Execute() {
|
||||
if err := rootCmd.Execute(); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Whoops. There was an error while executing your CLI '%s'", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
rootCmd.Flags().StringVar(&configPath, "config", "", "set the config path")
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue