File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change
1
+ # CLI & Files
2
+
3
+ Become familiar with go and the toolchain by building a JSON-file reading CLI tool: ` get-data path/to/file --path "foo.bar[0].baz" `
4
+
5
+ Timebox: 4 days
6
+
7
+ Objectives:
8
+
9
+ - Install and use [ cobra] [ cobra ]
10
+ - Use go build/go install/go get etc
11
+ - Understand what a process is & the basics of process - lifecycle
12
+ - Accept arguments on the CLI
13
+ - Open, read (and close) files from CLI arguments
14
+ - Learn about JSON and parsing
15
+ - Read strings from arguments
16
+ - Extract data from a JSON file and print it to the CLI
17
+ - Add support for YAML
18
+
19
+ [ cobra ] : https://github.com/spf13/cobra#overview
Original file line number Diff line number Diff line change
1
+ module vinery/cli-files
2
+
3
+ go 1.18
Original file line number Diff line number Diff line change
1
+ package main
2
+
3
+ func main () {}
You can’t perform that action at this time.
0 commit comments