MCPcopy Create free account
hub / github.com/AndroidPoet/playconsole-cli / RequirePackage

Function RequirePackage

internal/cli/shared.go:98–104  ·  view source on GitHub ↗

RequirePackage validates package name is set

(cmd *cobra.Command)

Source from the content-addressed store, hash-verified

96
97// RequirePackage validates package name is set
98func 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
107func CheckConfirm(cmd *cobra.Command) error {

Callers 15

runGrantFunction · 0.92
runRevokeFunction · 0.92
runUploadFunction · 0.92
runListFunction · 0.92
runFindFunction · 0.92
runWaitFunction · 0.92
runCreateFunction · 0.92
runGetFunction · 0.92
runValidateFunction · 0.92
runCommitFunction · 0.92
runDeleteFunction · 0.92
runUploadFunction · 0.92

Calls 1

GetPackageNameFunction · 0.85

Tested by

no test coverage detected