File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,11 @@ A world of struggle.
68
68
- ` go get -u github.com/spf13/cobra@latest `
69
69
- follow [ user guide] ( https://github.com/spf13/cobra/blob/master/user_guide.md ) to ` main.go ` and ` root.go ` with a root command that prints hello
70
70
- implement basic ls with ` os.ReadDir `
71
+ - allow the command to take arguments with ` cobra.ArbitraryArgs `
72
+ - when passed an argument such as ` go-ls assets ` , read from the passed directory
73
+ - handle the error (e.g. ` Error: fdopendir go.mod: not a directory ` when passing ` go-ls ` a file argument)
74
+ - update ` go-ls ` to match ` ls ` in terms of how it handles files (hint: ` os.Stat ` )
75
+ - make ` go-ls -h ` include a helpful description
71
76
72
77
[ go ] : https://go.dev/
73
78
[ cat ] : https://en.m.wikipedia.org/wiki/Cat_(Unix)
You can’t perform that action at this time.
0 commit comments