cli/m/cmd/test/main.go

26 lines
360 B
Go
Raw Normal View History

2022-06-16 09:02:24 +03:00
package main
import(
"github.com/k1574/gomtool/m/multitool"
"strconv"
"fmt"
)
var(
tools = multitool.Tools{
"echo" : func(args []string) {
fmt.Println(args)
},
"sum" : func(args []string) {
one, _ := strconv.Atoi(args[1])
two, _ := strconv.Atoi(args[2])
fmt.Println(one + two)
},
}
)
func main() {
multitool.Main("test", tools)
}