Added tool descriptions.

This commit is contained in:
Andrey Parhomenko 2022-10-11 17:55:26 +05:00
parent 9a3512c218
commit f492bfeea9
3 changed files with 27 additions and 25 deletions

2
go.mod
View file

@ -2,4 +2,4 @@ module github.com/surdeus/goblin
go 1.18
require github.com/surdeus/gomtool v0.0.0-20220806023210-bb1d6be89aa1 // indirect
require github.com/surdeus/gomtool v0.0.0-20221011123848-b7dbc364ea3a // indirect

2
go.sum
View file

@ -2,3 +2,5 @@ github.com/k1574/gomtool v0.0.0-20220616060224-023d1559d777 h1:r4Wm40GwE7GNC3VbI
github.com/k1574/gomtool v0.0.0-20220616060224-023d1559d777/go.mod h1:XT2+xWYiSEE6eX/nBgE6UnfIrBfijwPfv4fNJSVD+SA=
github.com/surdeus/gomtool v0.0.0-20220806023210-bb1d6be89aa1 h1:eTeqQV207H2ho0QFMxgxI75oT8E69aExmX6f6oltl9Y=
github.com/surdeus/gomtool v0.0.0-20220806023210-bb1d6be89aa1/go.mod h1:48d4QXOu0MwH0fbqseBInNdS6WiJ0+EzZU9K5sGu4uo=
github.com/surdeus/gomtool v0.0.0-20221011123848-b7dbc364ea3a h1:fUBhJuFtPNsJCi5//PT+Ni/QMNWzDVig28WK99FTkp0=
github.com/surdeus/gomtool v0.0.0-20221011123848-b7dbc364ea3a/go.mod h1:48d4QXOu0MwH0fbqseBInNdS6WiJ0+EzZU9K5sGu4uo=

View file

@ -1,7 +1,7 @@
package main
import(
"github.com/surdeus/gomtool/src/multitool"
mtool "github.com/surdeus/gomtool/src/multitool"
"github.com/surdeus/goblin/src/tool/cat"
"github.com/surdeus/goblin/src/tool/echo"
"github.com/surdeus/goblin/src/tool/mkdir"
@ -26,29 +26,29 @@ import(
)
func main() {
tools := multitool.Tools {
"basename" : basename.Run,
"cat": cat.Run,
"mkdir" : mkdir.Run,
"echo" : echo.Run,
"true" : gtrue.Run,
"false" : gfalse.Run,
"sort" : sort.Run,
"tac" : tac.Run,
"ls" : ls.Run,
"yes" : yes.Run,
"date" : date.Run,
"uniq" : uniq.Run,
"quote" : quote.Run,
"urlprs" : urlprs.Run,
"noext" : noext.Run,
"mergelbl" : mergelbl.Run,
"ec" : ec.Run,
"read" : read.Run,
"wc" : wc.Run,
"ftest" : ftest.Run,
"range" : grange.Run,
tools := mtool.Tools {
"basename" : mtool.Tool{basename.Run, "get base name of file path"},
"cat": mtool.Tool{cat.Run, "print file data to the standard output"},
"mkdir" : mtool.Tool{mkdir.Run, "make new directory"},
"echo" : mtool.Tool{echo.Run, "print strings to the standard output"},
"true" : mtool.Tool{gtrue.Run, "exit with true status"},
"false" : mtool.Tool{gfalse.Run, "exit with false status"},
"sort" : mtool.Tool{sort.Run, "sort strings inputed from standard input"},
"tac" : mtool.Tool{tac.Run, "print strings from standard input in reversed order"},
"ls" :mtool.Tool{ ls.Run, "list directory content"},
"yes" : mtool.Tool{ yes.Run, "print string infinite/exact amount times"},
"date" : mtool.Tool{date.Run, "print current date"},
"uniq" : mtool.Tool{uniq.Run, "filter repeated strings"},
"quote" : mtool.Tool{quote.Run, "quote words containing space characters"},
"urlprs" : mtool.Tool{urlprs.Run, "parse URLs"},
"noext" : mtool.Tool{noext.Run, "print file path without extension"},
"mergelbl" : mtool.Tool{mergelbl.Run, "merge line by line"},
"ec" : mtool.Tool{ec.Run, "render escape sequences"},
"read" : mtool.Tool{read.Run, "read lines and exit"},
"wc" : mtool.Tool{wc.Run, "count words, bytes, runes etc"},
"ftest" : mtool.Tool{ftest.Run, "filter files by specified features"},
"range" : mtool.Tool{grange.Run, "too lazy"},
}
multitool.Main("goblin", tools)
mtool.Main("goblin", tools)
}