Back to godoc.org

Package appflag

v0.20.5
Latest Go to latest

The latest major version is .

Published: Jul 24, 2020 | License: Apache-2.0 | Module: github.com/bufbuild/buf

Overview

Package appflag contains functionality to work with flags.

Index

type Builder

type Builder interface {
	BindRoot(flagSet *pflag.FlagSet)
	NewRunFunc(func(context.Context, applog.Container) error) func(context.Context, app.Container) error
}

Builder builds run functions.

func NewBuilder

func NewBuilder(options ...BuilderOption) Builder

NewBuilder returns a new Builder.

type BuilderOption

type BuilderOption func(*builder)

BuilderOption is an option for a new Builder

func BuilderWithTimeout

func BuilderWithTimeout(defaultTimeout time.Duration) BuilderOption

BuilderWithTimeout returns a new BuilderOption that adds a timeout flag and the default timeout.

func BuilderWithZapTracer

func BuilderWithZapTracer() BuilderOption

BuilderWithZapTracer enables zap tracing for the builder.

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