feat: enhanced error messages for cloud and oss specific commands (#347)

* feat: enhanced error messages for cloud and oss specific commands

* chore: rename test
This commit is contained in:
William Baker
2021-12-28 10:03:29 -05:00
committed by GitHub
parent 13d0827815
commit 7af0b2ae73
36 changed files with 1503 additions and 1985 deletions

View File

@ -0,0 +1,26 @@
package context
import "github.com/urfave/cli"
const (
contextKeyCloudOnly = "cloudOnly"
contextKeyOssOnly = "ossOnly"
)
func SetCloudOnly(ctx *cli.Context) {
ctx.App.Metadata[contextKeyCloudOnly] = true
}
func SetOssOnly(ctx *cli.Context) {
ctx.App.Metadata[contextKeyOssOnly] = true
}
func GetCloudOnly(ctx *cli.Context) bool {
_, ok := ctx.App.Metadata[contextKeyCloudOnly].(bool)
return ok
}
func GetOssOnly(ctx *cli.Context) bool {
_, ok := ctx.App.Metadata[contextKeyOssOnly].(bool)
return ok
}