mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
15 lines
249 B
Go
15 lines
249 B
Go
package cmd
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
"github.com/spf13/viper"
|
|
)
|
|
|
|
func bindFlagsToViper(cmd *cobra.Command) error {
|
|
if err := viper.BindPFlags(cmd.Flags()); err != nil {
|
|
return err
|
|
}
|
|
|
|
return viper.BindPFlags(cmd.PersistentFlags())
|
|
}
|