cli

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2018 License: MIT Imports: 15 Imported by: 4

Documentation

Index

Constants

View Source
const OauthTokenURL = "https://us.battle.net/oauth/token"

OauthTokenURL blizard oauth2 url to fetch token

View Source
const Version = "0.0.10"

Version of the app

Variables

This section is empty.

Functions

func AppName

func AppName(game battle.Game) string

AppName : determine app name bbased on Game value

func PrintBody

func PrintBody(resp *http.Response, pretty bool) error

PrintBody : print response body

func PrintHeader

func PrintHeader(resp *http.Response)

PrintHeader : print response header

func PrintHelp

func PrintHelp() error

PrintHelp : ...

func PrintVersion

func PrintVersion()

PrintVersion : print the version

func Run

func Run(game battle.Game, args []string)

Run the app

Types

type AppHelp

type AppHelp struct {
	Name         string
	Usage        string
	Apps         []string
	Examples     []string
	QueryFlags   []FlagHelp
	GeneralFlags []FlagHelp
	Version      string
}

AppHelp : base struct for template parsing

type FlagHelp

type FlagHelp struct {
	Names []string
	Usage string
}

FlagHelp : context for flag help

Jump to

Keyboard shortcuts

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