Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2080)

Unified Diff: buildbucket/client/cmd/buildbucket/get.go

Issue 2227113002: Update bulidbucket client (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@master
Patch Set: rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « buildbucket/client/cmd/buildbucket/doc.go ('k') | buildbucket/client/cmd/buildbucket/main.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: buildbucket/client/cmd/buildbucket/get.go
diff --git a/buildbucket/client/cmd/buildbucket/get.go b/buildbucket/client/cmd/buildbucket/get.go
new file mode 100644
index 0000000000000000000000000000000000000000..0d6b1b34e06d3d22120cb10177a8604eaf8fd4c1
--- /dev/null
+++ b/buildbucket/client/cmd/buildbucket/get.go
@@ -0,0 +1,39 @@
+// Copyright 2016 The LUCI Authors. All rights reserved.
+// Use of this source code is governed under the Apache License, Version 2.0
+// that can be found in the LICENSE file.
+
+package main
+
+import (
+ "fmt"
+
+ "github.com/maruel/subcommands"
+
+ "github.com/luci/luci-go/common/cli"
+)
+
+var cmdGet = &subcommands.Command{
+ UsageLine: `get [flags] <build id>`,
+ ShortDesc: "get details about a build",
+ LongDesc: "Get details about a build.",
+ CommandRun: func() subcommands.CommandRun {
+ c := &getRun{}
+ c.SetDefaultFlags()
+ return c
+ },
+}
+
+type getRun struct {
+ baseCommandRun
+ buildIDArg
+}
+
+func (r *getRun) Run(a subcommands.Application, args []string) int {
+ ctx := cli.GetContext(a, r)
+
+ if err := r.parseArgs(args); err != nil {
+ return r.done(ctx, err)
+ }
+
+ return r.callAndDone(ctx, "GET", fmt.Sprintf("builds/%d", r.buildID), nil)
+}
« no previous file with comments | « buildbucket/client/cmd/buildbucket/doc.go ('k') | buildbucket/client/cmd/buildbucket/main.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698