extkingpin

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Taken from Thanos project.

Copyright (c) The Thanos Authors. Licensed under the Apache License 2.0.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	FlagClause
	// contains filtered or unexported fields
}

App is a wrapper around kingping.Application for easier use.

func NewApp

func NewApp(app *kingpin.Application) *App

NewApp returns new App.

func (*App) Command

func (a *App) Command(cmd string, help string) AppClause

func (*App) Parse

func (a *App) Parse() (cmd string, runner Run)

type AppClause

type AppClause interface {
	FlagClause
	ArgClause
	Command(cmd string, help string) AppClause
	Flags() []*kingpin.FlagModel
	Run(r Run)
}

type ArgClause

type ArgClause interface {
	Arg(name, help string) *kingpin.ArgClause
}

type FlagClause

type FlagClause interface {
	Flag(name, help string) *kingpin.FlagClause
}

type Run

type Run func(ctx context.Context, logger log.Logger) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL