Back to godoc.org

Package cli

v0.0.0-...-1557bcf
Latest Go to latest

The latest major version is .

Published: Aug 13, 2020 | License: Apache-2.0 | Module: github.com/luci/luci-go

Overview

Package cli implements CLI client for buildbucket service.

Index

func Main

func Main(p Params, args []string) int

Main is the main function of the bb application.

func PropertiesFlag

func PropertiesFlag(props *structpb.Struct) flag.Getter

PropertiesFlag returns a flag.Getter that can read property values into props.

If a flag value starts with @, properties are read from the JSON file at the path that follows @. Example:

-p @my_properties.json

This form can be used only in the first flag value.

Otherwise, a flag value must have name=value form. If the property value is valid JSON, then it is parsed as JSON; otherwise treated as a string. Example:

-p foo=1 -p 'bar={"a": 2}'

Different property names can be specified multiple times.

Panics if props is nil. String() of the return value panics if marshaling of props to JSON fails.

func StatusFlag

func StatusFlag(status *pb.Status) flag.Getter

StatusFlag returns a flag.Getter which reads a flag value into status. Valid flag values: scheduled, started, ended, success, failure, infra_failure, canceled. Panics if status is nil.

type Params

type Params struct {
	DefaultBuildbucketHost string
	Auth                   auth.Options
}

Params is the parameters for the bb application.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier