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/history.go
Cornelius Toole 200a3d1a65 Hide unimplemented commands
Signed-off-by: Cornelius Toole <cornelius.toole@gmail.com>
2021-06-28 09:28:36 +02:00

34 lines
729 B
Go

package cmd
import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
var historyCmd = &cobra.Command{
Use: "history",
Short: "List past changes to an environment",
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")
},
// Remove hidden flag once command has been implemented
Hidden: true,
}
func init() {
if err := viper.BindPFlags(historyCmd.Flags()); err != nil {
panic(err)
}
}