| package main |
| |
| import ( |
| "context" |
| "fmt" |
| |
| "github.com/golang/protobuf/ptypes/any" |
| "go.chromium.org/luci/luciexe/build" |
| ftxproto "go.fuchsia.dev/infra/cmd/ftxtest/proto" |
| ) |
| |
| func main() { |
| input := &ftxproto.InputProperties{} |
| var writeOutputProps func(*any.Any) |
| build.Main(input, &writeOutputProps, nil, func(ctx context.Context, extraArgs []string, state *build.State) error { |
| fmt.Printf("Build started with args: %v\n", extraArgs) |
| return processInput(ctx, input) |
| }) |
| } |
| |
| func processInput(ctx context.Context, input *ftxproto.InputProperties) error { |
| fmt.Printf("Build input: %+v\n", input) |
| return nil |
| } |