32 lines
643 B
Go
32 lines
643 B
Go
package cmd
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
"github.com/spf13/viper"
|
|
)
|
|
|
|
var logoutCmd = &cobra.Command{
|
|
Use: "logout",
|
|
Short: "Logout from Dagger Cloud",
|
|
Args: cobra.NoArgs,
|
|
PreRun: func(cmd *cobra.Command, args []string) {
|
|
// Fix Viper bug for duplicate flags:
|
|
// https://github.com/spf13/viper/issues/233
|
|
if err := viper.BindPFlags(cmd.Flags()); err != nil {
|
|
panic(err)
|
|
}
|
|
},
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
// lg := logger.New()
|
|
// ctx := lg.WithContext(cmd.Context())
|
|
|
|
panic("not implemented")
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
if err := viper.BindPFlags(logoutCmd.Flags()); err != nil {
|
|
panic(err)
|
|
}
|
|
}
|