Use the new version of cli package.
This commit is contained in:
parent
779c6cf5ab
commit
70d92efcee
3 changed files with 11 additions and 1 deletions
2
go.mod
2
go.mod
|
@ -2,4 +2,4 @@ module github.com/omnipunk/tk
|
|||
|
||||
go 1.18
|
||||
|
||||
require github.com/omnipunk/cli v0.0.0-20231110091353-f877427ca833
|
||||
require github.com/omnipunk/cli v0.0.0-20231111174053-707875fd6a00
|
||||
|
|
2
go.sum
2
go.sum
|
@ -1,2 +1,4 @@
|
|||
github.com/omnipunk/cli v0.0.0-20231110091353-f877427ca833 h1:sNNDuH0hbT+3Mqh200JM54ZAQPt0g9LsOeUzMMadg+4=
|
||||
github.com/omnipunk/cli v0.0.0-20231110091353-f877427ca833/go.mod h1:j1oX8nchf3eIbEvGLIDe+glTXT/Mkz6w4UO1/3EQ8tc=
|
||||
github.com/omnipunk/cli v0.0.0-20231111174053-707875fd6a00 h1:/yDyAzahNPrj3lzksfO6wfqk2pC8R1djXhbLjD2evOw=
|
||||
github.com/omnipunk/cli v0.0.0-20231111174053-707875fd6a00/go.mod h1:j1oX8nchf3eIbEvGLIDe+glTXT/Mkz6w4UO1/3EQ8tc=
|
||||
|
|
8
main.go
8
main.go
|
@ -31,12 +31,18 @@ import (
|
|||
var root = mtool.T("tk").Subs(
|
||||
mtool.T("cat").Func(cat.Run).Desc(
|
||||
"concatenate files",
|
||||
).Usage(
|
||||
"[file1 file2 ...fileN]",
|
||||
),
|
||||
mtool.T("mkdir").Func(mkdir.Run).Desc(
|
||||
"make new directories",
|
||||
).Usage(
|
||||
"<dir1 [dir2 dir3 ...dirN]>",
|
||||
),
|
||||
mtool.T("echo").Func(echo.Run).Desc(
|
||||
"print strings",
|
||||
).Usage(
|
||||
"[str1 str2 ...strN]",
|
||||
),
|
||||
mtool.T("true").Func(func(flags *mtool.Flags){
|
||||
os.Exit(0)
|
||||
|
@ -52,6 +58,8 @@ var root = mtool.T("tk").Subs(
|
|||
),
|
||||
mtool.T("ls").Func(ls.Run).Desc(
|
||||
"list files",
|
||||
).Usage(
|
||||
"[fileDir1 fileDir2 ...fileDirN]",
|
||||
),
|
||||
mtool.T("yes").Func(yes.Run).Desc(
|
||||
"repeat string",
|
||||
|
|
Loading…
Reference in a new issue