This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
dagger/cmd/dagger/cmd/logout.go
Sam Alba 661affa4cb more basic commands + lint fixes
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-03-25 22:29:11 +00:00

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)
}
}