Exemple #1
0
func (cmd *PpCommand) cbshArgParse(line string) (err error) {
	f := flag.NewFlagSet("ppcbsh", flag.ContinueOnError)
	f.BoolVar(&ppCbshOption.pool, "pool", false,
		"Pretty print current pool details")
	f.BoolVar(&ppCbshOption.bucket, "bucket", false,
		"Pretty print current bucket details")
	return f.Parse(api.ParseCmd(line)[1:])
}
Exemple #2
0
func (cmd *RunCommand) indexArgParse(line string) (err error) {
	f := flag.NewFlagSet("run", flag.ContinueOnError)
	f.StringVar(&runOption.configFile, "c", "",
		"Specify configuration file")
	f.StringVar(&runOption.program, "p", "",
		"Specify program to run or restart")
	err = f.Parse(api.ParseCmd(line)[1:])
	return
}
Exemple #3
0
func (cmd *PpCommand) n1qlArgParse(line string) (err error) {
	f := flag.NewFlagSet("ppn1ql", flag.ContinueOnError)
	return f.Parse(api.ParseCmd(line)[1:])
}