github.com/mook-as/cf-cli@v7.0.0-beta.28.0.20200120190804-b91c115fae48+incompatible/cf/requirements/unsupported_legacy_flag.go (about) 1 package requirements 2 3 import ( 4 "errors" 5 "strings" 6 7 . "code.cloudfoundry.org/cli/cf/i18n" 8 ) 9 10 type UnsupportedLegacyFlagRequirement struct { 11 flags []string 12 } 13 14 func NewUnsupportedLegacyFlagRequirement(flags []string) UnsupportedLegacyFlagRequirement { 15 return UnsupportedLegacyFlagRequirement{ 16 flags: flags, 17 } 18 } 19 20 func (r UnsupportedLegacyFlagRequirement) Execute() error { 21 return errors.New(T( 22 "The following flags cannot be used with deprecated usage: {{.flags}}", 23 map[string]interface{}{ 24 "flags": strings.Join(r.flags, ", "), 25 })) 26 }