base

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package base provides base support.

Index

Constants

View Source
const CmdName = "leetcode"

CmdName - base.CmdName

Variables

View Source
var (
	Commands []*Command
	Mutex    sync.Mutex
)

base var

Functions

func AuthInfo

func AuthInfo(cmd string) string

AuthInfo - base.AuthInfo

func CheckErr

func CheckErr(err error)

CheckErr - base.CheckErr

func FilePutContents

func FilePutContents(filename string, data []byte) []byte

FilePutContents - base.FilePutContents

func JSONIndent added in v1.4.9

func JSONIndent(src []byte) []byte

JSONIndent - base.JSONIndent

func Usage

func Usage()

Usage - base.Usage

Types

type Command

type Command struct {
	Run       func(cmd *Command, args []string)
	UsageLine string
	Short     string
	Long      string
	Hidden    bool
}

Command - base.Command

func (*Command) Name

func (c *Command) Name() string

Name - base.Name

func (*Command) Usage

func (c *Command) Usage()

Usage - base.Usage

func (*Command) UsageHelp

func (c *Command) UsageHelp()

UsageHelp - base.UsageHelp

Jump to

Keyboard shortcuts

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