Skip to content

Commit b34f460

Browse files
committed
cli-files directory with go basics
1 parent 3363754 commit b34f460

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

cli-files/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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

cli-files/go.mod

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module vinery/cli-files
2+
3+
go 1.18

cli-files/main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package main
2+
3+
func main() {}

0 commit comments

Comments
 (0)