From 70d92efceec256bd20208605bf461b35e1fc0d92 Mon Sep 17 00:00:00 2001 From: surdeus Date: Sat, 11 Nov 2023 22:44:23 +0300 Subject: [PATCH] Use the new version of cli package. --- go.mod | 2 +- go.sum | 2 ++ main.go | 8 ++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index e12014e..4f4f4a8 100644 --- a/go.mod +++ b/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 diff --git a/go.sum b/go.sum index 4e2ce58..bed06d2 100644 --- a/go.sum +++ b/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= diff --git a/main.go b/main.go index 2608f67..7558803 100644 --- a/main.go +++ b/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( + "", ), 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",