base

package
v1.6.6 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package base provides base support.

Index

Constants

View Source
const URL = "https://github.com/awesee/leetcode/tree/master"

URL - base.URL

Variables

View Source
var CmdName = filepath.Base(os.Args[0])

CmdName - base.CmdName

View Source
var Commands []*Command

Commands - base.Commands

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.6.6

func JSONIndent(src []byte) []byte

JSONIndent - base.JSONIndent

func Register added in v1.6.6

func Register(cmds ...*Command)

Register - base.Register

func Run added in v1.6.6

func Run()

Run - base.Run

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.Command.Name

func (*Command) Usage

func (c *Command) Usage()

Usage - base.Command.Usage

func (*Command) UsageHelp

func (c *Command) UsageHelp()

UsageHelp - base.Command.UsageHelp

Jump to

Keyboard shortcuts

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