package main
spa
import (
input
"fmt"
cmd
"flag"
string
)
it
func main(){
io
data_path := flag.String("D","/home/manu/sample/","DB data path")
import
log_file := flag.String("l","/home/manu/sample.log","log file")
file
nowait_flag :=flag.Bool("W",false,"do not wait until operation completes")
im
flag.Parse()
co
var cmd string = flag.Arg(0);
fmt.Printf("action : %s\n",cmd)
fmt.Printf("data path: %s\n",*data_path)
fmt.Printf("log file : %s\n",*log_file)
fmt.Printf("nowait : %v\n",*nowait_flag)
fmt.Printf("-------------------------------------------------------\n")
fmt.Printf("there are %d non-flag input param\n",flag.NArg())
for i,param := range flag.Args(){
fmt.Printf("#%d :%s\n",i,param)
}
}