RequirePackage validates package name is set
(cmd *cobra.Command)
| 96 | |
| 97 | // RequirePackage validates package name is set |
| 98 | func RequirePackage(cmd *cobra.Command) error { |
| 99 | pkg := GetPackageName() |
| 100 | if pkg == "" { |
| 101 | return fmt.Errorf("package name required: use --package flag or set GPC_PACKAGE environment variable") |
| 102 | } |
| 103 | return nil |
| 104 | } |
| 105 | |
| 106 | // CheckConfirm validates confirmation for destructive operations |
| 107 | func CheckConfirm(cmd *cobra.Command) error { |
no test coverage detected