github.com/cloudfoundry-incubator/stembuild@v0.0.0-20211223202937-5b61d62226c6/commandparser/construct_validator.go (about) 1 package commandparser 2 3 import ( 4 "os" 5 "path/filepath" 6 ) 7 8 type ConstructValidator struct{} 9 10 func (c *ConstructValidator) PopulatedArgs(args ...string) bool { 11 for _, arg := range args { 12 if arg == "" { 13 return false 14 } 15 } 16 return true 17 } 18 19 func (c *ConstructValidator) LGPOInDirectory() bool { 20 dir, _ := os.Getwd() 21 _, err := os.Stat(filepath.Join(dir, "LGPO.zip")) 22 if err != nil { 23 return false 24 } 25 return true 26 }