Documentation ¶
Index ¶
- Constants
- Variables
- func Clone(args ParsedArgs) (err error)
- func Eval(opts docopt.Opts) error
- func Gen(args ParsedArgs) (err error)
- func List(args ParsedArgs) (err error)
- func Open(args ParsedArgs) (err error)
- func Parse(args ParsedArgs) (err error)
- func Pull(args ParsedArgs) (err error)
- func Race(args ParsedArgs) (err error)
- func Setup(parsedArgs ParsedArgs) error
- func Sid(args ParsedArgs) (err error)
- func Stand(args ParsedArgs) (err error)
- func Submit(args ParsedArgs) (err error)
- func Test(args ParsedArgs) (err error)
- func Upgrade(args ParsedArgs) (err error)
- func Watch(args ParsedArgs) (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 ParsedArgs ¶
type ParsedArgs struct { Info client.Info File string `docopt:"--file"` Handle string `docopt:"--handle"` Password string `docopt:"--pass"` LangId string `docopt:"--lang"` Specifier []string `docopt:"<specifier>"` Alias string `docopt:"<alias>"` Accepted bool `docopt:"ac"` All bool `docopt:"all"` Version string `docopt:"{version}"` Setup bool `docopt:"setup"` Submit bool `docopt:"submit"` Upgrade bool `docopt:"upgrade"` }
ParsedArgs parsed arguments
type WriteCounter ¶
type WriteCounter struct {
Count, Total uint
// contains filtered or unexported fields
}
WriteCounter progress counter
Click to show internal directories.
Click to hide internal directories.