/taskman

taskman + golang > Makefile

Primary LanguageGo

taskman

Build Status

Write tasks with the power of go

package main

import (
    "github.com/korchasa/taskman"
    "log"
    "strconv"
)

// Hello says Hello
func Hello(who string, times int, show bool) {
	if !show {
		return
	}
	for times > 0 {
		log.Printf("Hello, %s!\n", who)
		times--
	}
}

func main() {
	taskman.Run(Hello)
}

List tasks

$ go build && ./taskman

Usage:
  ./taskman [command] [arguments]

Commands:
  Hello -who=string -times=int -show=bool  - says Hello

Run them

go build && ./taskman Hello -who=me -times=5 -show
Task Hello
Hello, me!
Hello, me!
Hello, me!
Hello, me!
Hello, me!