Documentation ¶
Index ¶
- Constants
- Variables
- func Clone() (err error)
- func Config() (err error)
- func Eval(opts docopt.Opts) error
- func Gen() (err error)
- func List() (err error)
- func Open() (err error)
- func Parse() (err error)
- func Pull() (err error)
- func Race() (err error)
- func Sid() (err error)
- func Stand() (err error)
- func Submit() (err error)
- func Test() (err error)
- func Upgrade() (err error)
- func Watch() (err error)
- type CodeList
- type ParsedArgs
- type WriteCounter
Constants ¶
View Source
const ContestRegStr = `\d+`
ContestRegStr contest
View Source
const GroupRegStr = `\w{10}`
GroupRegStr group
View Source
const ProblemRegStr = `\w+`
ProblemRegStr problem
View Source
const StrictProblemRegStr = `[a-zA-Z]+\d*`
StrictProblemRegStr strict problem
View Source
const SubmissionRegStr = `\d+`
SubmissionRegStr submission
Variables ¶
View Source
var ArgRegStr = [...]string{ `^[cC][oO][nN][tT][eE][sS][tT][sS]?$`, `^[gG][yY][mM][sS]?$`, `^[gG][rR][oO][uU][pP][sS]?$`, `^[aA][cC][mM][sS][gG][uU][rR][uU]$`, fmt.Sprintf(`/contest/(?P<contestID>%v)(/problem/(?P<problemID>%v))?`, ContestRegStr, ProblemRegStr), fmt.Sprintf(`/gym/(?P<contestID>%v)(/problem/(?P<problemID>%v))?`, ContestRegStr, ProblemRegStr), fmt.Sprintf(`/problemset/problem/(?P<contestID>%v)/(?P<problemID>%v)`, ContestRegStr, ProblemRegStr), fmt.Sprintf(`/group/(?P<groupID>%v)(/contest/(?P<contestID>%v)(/problem/(?P<problemID>%v))?)?`, GroupRegStr, ContestRegStr, ProblemRegStr), fmt.Sprintf(`/problemsets/acmsguru/problem/(?P<contestID>%v)/(?P<problemID>%v)`, ContestRegStr, ProblemRegStr), fmt.Sprintf(`/problemsets/acmsguru/submission/(?P<contestID>%v)/(?P<submissionID>%v)`, ContestRegStr, SubmissionRegStr), fmt.Sprintf(`/submission/(?P<submissionID>%v)`, SubmissionRegStr), fmt.Sprintf(`^(?P<contestID>%v)(?P<problemID>%v)$`, ContestRegStr, StrictProblemRegStr), fmt.Sprintf(`^(?P<contestID>%v)$`, ContestRegStr), fmt.Sprintf(`^(?P<problemID>%v)$`, StrictProblemRegStr), fmt.Sprintf(`^(?P<groupID>%v)$`, GroupRegStr), }
ArgRegStr for parsing arg
View Source
var ArgType = [...]string{
"contest",
"gym",
"group",
"acmsguru",
"contest",
"gym",
"contest",
"group",
"acmsguru",
"acmsguru",
"",
"",
"",
"",
"",
}
ArgType type
View Source
var ArgTypePathRegStr = [...]string{ fmt.Sprintf("%v/%v/((?P<contestID>%v)/((?P<problemID>%v)/)?)?", "%v", "%v", ContestRegStr, ProblemRegStr), fmt.Sprintf("%v/%v/((?P<contestID>%v)/((?P<problemID>%v)/)?)?", "%v", "%v", ContestRegStr, ProblemRegStr), fmt.Sprintf("%v/%v/((?P<groupID>%v)/((?P<contestID>%v)/((?P<problemID>%v)/)?)?)?", "%v", "%v", GroupRegStr, ContestRegStr, ProblemRegStr), fmt.Sprintf("%v/%v/((?P<problemID>%v)/)?", "%v", "%v", ProblemRegStr), }
ArgTypePathRegStr path
Functions ¶
Types ¶
type CodeList ¶ added in v0.1.2
CodeList Name matches some template suffix, index are template array indexes
type ParsedArgs ¶ added in v1.0.0
type ParsedArgs struct { Info client.Info File string Specifier []string `docopt:"<specifier>"` Alias string `docopt:"<alias>"` Accepted bool `docopt:"ac"` All bool `docopt:"all"` Handle string `docopt:"<handle>"` Version string `docopt:"{version}"` Config bool `docopt:"config"` Submit bool `docopt:"submit"` List bool `docopt:"list"` Parse bool `docopt:"parse"` Gen bool `docopt:"gen"` Test bool `docopt:"test"` Watch bool `docopt:"watch"` Open bool `docopt:"open"` Stand bool `docopt:"stand"` Sid bool `docopt:"sid"` Race bool `docopt:"race"` Pull bool `docopt:"pull"` Clone bool `docopt:"clone"` Upgrade bool `docopt:"upgrade"` }
ParsedArgs parsed arguments
var Args *ParsedArgs
Args global variable
type WriteCounter ¶ added in v0.5.0
type WriteCounter struct {
Count, Total uint
// contains filtered or unexported fields
}
WriteCounter progress counter
Click to show internal directories.
Click to hide internal directories.