INNER CODE UNIT · Go
main
megaease/easemesh · emctl/cmd/transformer/main.go:31
func main() {
flag.Parse()
resourceType := flag.Arg(0)
if resourceType == "" {
common.ExitWithErrorf("usage: generator <resourceType> [resource=url]")
}
var resourceMappings []string
if len(flag.Args()) > 1 {
resourceMappings = flag.Args()[1:]
}
subResource := ""
if strings.Contains(resourceType, ".") {
r := strings.Split(resourceType, ".")
resourceType = r[0]
subResource = r[1]