Skip to content

Commit d245abd

Browse files
committed
more steps
1 parent 171c6b0 commit d245abd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cli-files/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ A world of struggle.
6868
- `go get -u github.com/spf13/cobra@latest`
6969
- 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
7070
- 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
7176

7277
[go]: https://go.dev/
7378
[cat]: https://en.m.wikipedia.org/wiki/Cat_(Unix)

0 commit comments

Comments
 (0)