2022-06-16 09:02:24 +03:00
|
|
|
package main
|
|
|
|
|
|
|
|
import(
|
2022-08-06 05:29:09 +03:00
|
|
|
"github.com/surdeus/gomtool/src/multitool"
|
2022-06-16 09:02:24 +03:00
|
|
|
"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)
|
|
|
|
}
|
|
|
|
|