github.com/taubyte/tau-cli@v0.1.13-0.20240326000942-487f0d57edfc/cli/commands/dream/build/command.go (about) 1 package build 2 3 import ( 4 "github.com/taubyte/tau-cli/cli/common/options" 5 "github.com/taubyte/tau-cli/flags" 6 "github.com/taubyte/tau-cli/i18n" 7 "github.com/urfave/cli/v2" 8 ) 9 10 func attachName0(commands []*cli.Command) []*cli.Command { 11 for _, cmd := range commands { 12 cmd.Flags = append(cmd.Flags, flags.Name) 13 cmd.ArgsUsage = i18n.ArgsUsageName 14 cmd.Before = options.SetNameAsArgs0 15 } 16 17 return commands 18 } 19 20 var Command = &cli.Command{ 21 Name: "build", 22 Subcommands: attachName0([]*cli.Command{ 23 { 24 Name: "config", 25 Action: buildConfig, 26 }, 27 { 28 Name: "code", 29 Action: buildCode, 30 }, 31 { 32 Name: "function", 33 Action: buildFunction, 34 }, 35 { 36 Name: "website", 37 Action: buildWebsite, 38 }, 39 { 40 Name: "library", 41 Action: buildLibrary, 42 }, 43 }), 44 }