buf: github.com/bufbuild/buf/internal/pkg/app/appflag Index | Files

package appflag

import "github.com/bufbuild/buf/internal/pkg/app/appflag"

Package appflag contains functionality to work with flags.


Package Files

appflag.go builder.go container.go

type Builder Uses

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

Builder builds run functions.

func NewBuilder Uses

func NewBuilder(appName string, options ...BuilderOption) Builder

NewBuilder returns a new Builder.

type BuilderOption Uses

type BuilderOption func(*builder)

BuilderOption is an option for a new Builder

func BuilderWithTimeout Uses

func BuilderWithTimeout(defaultTimeout time.Duration) BuilderOption

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

func BuilderWithTracing Uses

func BuilderWithTracing() BuilderOption

BuilderWithTracing enables zap tracing for the builder.

type Container Uses

type Container interface {

Container is a container.

Package appflag imports 12 packages (graph). Updated 2020-10-20. Refresh now. Tools for package owners.