| OLD | NEW |
| (Empty) |
| 1 // Copyright 2016 The LUCI Authors. All rights reserved. | |
| 2 // Use of this source code is governed under the Apache License, Version 2.0 | |
| 3 // that can be found in the LICENSE file. | |
| 4 | |
| 5 package main | |
| 6 | |
| 7 import ( | |
| 8 "os" | |
| 9 | |
| 10 "github.com/maruel/subcommands" | |
| 11 "golang.org/x/net/context" | |
| 12 | |
| 13 "github.com/luci/luci-go/common/cli" | |
| 14 "github.com/luci/luci-go/common/logging/gologger" | |
| 15 ) | |
| 16 | |
| 17 var logCfg = gologger.LoggerConfig{ | |
| 18 Format: `%{message}`, | |
| 19 Out: os.Stderr, | |
| 20 } | |
| 21 | |
| 22 var application = &cli.Application{ | |
| 23 Name: "buildbucket", | |
| 24 Title: "A cli client for buildbucket.", | |
| 25 Context: func(ctx context.Context) context.Context { | |
| 26 return logCfg.Use(ctx) | |
| 27 }, | |
| 28 Commands: []*subcommands.Command{ | |
| 29 cmdPutBatch, | |
| 30 cmdGet, | |
| 31 cmdCancel, | |
| 32 subcommands.CmdHelp, | |
| 33 }, | |
| 34 } | |
| 35 | |
| 36 func main() { | |
| 37 os.Exit(subcommands.Run(application, os.Args[1:])) | |
| 38 } | |
| OLD | NEW |