cmd

package
v0.0.0-...-4d80be4 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const ContestRegStr = `[^\s/]+`

ContestRegStr contest

View Source
const ProblemRegStr = `[^\s/]+`

ProblemRegStr problem

Variables

View Source
var ArgRegStr = [...]string{
	fmt.Sprintf(`/contests/(%v)(/tasks/(%v))?`, ContestRegStr, ProblemRegStr),
}

ArgRegStr for parsing arg

View Source
var ArgType = [...]string{
	"contest",
	"",
}

ArgType type

View Source
var ArgTypePathRegStr = [...]string{
	fmt.Sprintf(`/contest/(%v)(/(%v))?`, ContestRegStr, ProblemRegStr),
}

ArgTypePathRegStr path

Functions

func Config

func Config() (err error)

Config command

func Eval

func Eval(opts docopt.Opts) error

Eval opts

func Gen

func Gen() (err error)

Gen command

func Open

func Open() (err error)

Open command

func Parse

func Parse() (err error)

Parse command

func Sid

func Sid() (err error)

Sid command

func Stand

func Stand() (err error)

Stand command

func Submit

func Submit() (err error)

Submit command

func Test

func Test() (err error)

Test command

Types

type CodeList

type CodeList struct {
	Name  string
	Index []int
}

CodeList Name matches some template suffix, index are template array indexes

type ParsedArgs

type ParsedArgs struct {
	Info      client.Info
	File      string
	Specifier []string `docopt:"<specifier>"`
	Alias     string   `docopt:"<alias>"`
	Username  string   `docopt:"<username>"`
	Version   string   `docopt:"{version}"`
	Config    bool     `docopt:"config"`
	Submit    bool     `docopt:"submit"`
	Parse     bool     `docopt:"parse"`
	Gen       bool     `docopt:"gen"`
	Test      bool     `docopt:"test"`
	Open      bool     `docopt:"open"`
}

ParsedArgs parsed arguments

var Args *ParsedArgs

Args global variable

Jump to

Keyboard shortcuts

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