extkingpin

package
v0.0.0-...-dafa24a Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2020 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, setup SetupFunc)

type AppClause

type AppClause interface {
	FlagClause
	Command(cmd string, help string) AppClause
	Flags() []*kingpin.FlagModel
	Setup(s SetupFunc)
}

type FlagClause

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

type SetupFunc

type SetupFunc func(*run.Group, log.Logger) error

Jump to

Keyboard shortcuts

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