示例#1
0
func main() {
	showTasks := flag.Bool("T", false, "Show Tasks")
	showHelp := flag.Bool("help", false, "Show Help")
	flag.Parse()

	if *showHelp {
		fmt.Printf("Show Help here\n")
		return
	}

	make_all_tasks()

	taskName := g.DefaultTaskName
	if len(flag.Args()) > 0 {
		taskName = flag.Args()[0]
	}

	taskName, args := g.ParseTaskString(taskName)

	if *showTasks {
		g.ShowTasks()
		return
	}

	g.InvokeTask(taskName, args)
}
示例#2
0
// TODO: handle command line arguments, take the task to run from the cmdline
// TODO: parse task arguments
func xmain() {
	// fmt.Printf("TaskManager: %q\n", TaskManager)
	//InvokeTask("task2")
	g.InvokeTask("task4", make([]string, 0))
}