Skip to content

Commit bb334c2

Browse files
author
xiao
committed
add text tasks in module 3 and 4; update package url in go.mod
1 parent 15e389d commit bb334c2

File tree

3 files changed

+21
-18
lines changed

3 files changed

+21
-18
lines changed

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/xiaounb/go_cli_playbook
1+
module github.com/pluralsight-projects/golang-cli-playbook
22

33
go 1.13
44

task/module3.md

+12-9
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,30 @@ To test this module locally:
1010
* Run command `go test -run Module3` to run all tests for module 3, or
1111
* Run command `go test -v -run Module3` to run all tests for module 3 with verbose information
1212

13-
## Task 1
14-
To add dependencies to current module and install the packages, we use the [`go get` command](https://golang.org/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them).
13+
## Task 1: Get help information for `go get`
14+
The [`go get` command](https://golang.org/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them) will be used to download and install packages.
1515
The syntax can be as simple as this:
1616
```
1717
go get <package>
1818
```
1919

2020
The above `package` can be the git repo of the package if hosted on github (that is, without the `https://` prefix).
2121

22+
To get more information, check the output of `go help get`.
23+
24+
To list all packages in the module, you can use `go list -m all`.
25+
Help on `list` can be found at `go help list`
26+
27+
28+
## Task 2: Use `go get` to install a package
29+
To add dependencies to current module and install the packages, we use the `go get` command.
30+
2231
Your task is to write a command to import the following package which can be used to retrieve the sunrise and sunset time given a location and a date. Here is the github repo:
2332
```
2433
https://github.com/nathan-osman/go-sunrise
2534
```
2635

27-
In the terminal, type in the command to import the above package.
28-
36+
In the terminal, type in the complete command to import the above package.
2937

3038

31-
## Extra help
32-
Here is the command to get more information on `go get`:
33-
- `go help get`
3439

35-
To list all packages in the module, you can use `go list -m all`. Help on `list` can be found at:
36-
- `go help list`

task/module4.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,26 @@ To test this module locally:
1010
* Run command `go test -run Module4` to run all tests for module 4, or
1111
* Run command `go test -v -run Module4` to run all tests for module 4 with verbose information
1212

13-
## Task 1
13+
## Task 1: Get help information of `go install`
1414
To compiles and installs the dependency packages, we use the [`go install` command](https://golang.org/cmd/go/#hdr-Compile_and_install_packages_and_dependencies).
15+
1516
The syntax can be as simple as this:
1617
```
1718
go install <package>
1819
```
1920

2021
Same as `go get`, the above `package` can be the git repo of the package if hosted on github (that is, without the `https://` prefix).
2122

23+
To get more information on `go install`, check the output of `go help install`
24+
25+
To get more information about the build flags, check the output of `go help build`
26+
27+
28+
## Task 2: Use `go install` to compile and install a package
2229
Your task is to write a command to import the following package which can be used to provide common case conversion functions.
2330
Here is the `go.dev` link: (Note: you need to read and find out the value for `<package>`)
2431
```
2532
https://pkg.go.dev/github.com/codemodus/kace?tab=doc
2633
```
2734

2835
In the terminal, type in the command to import the `kace`
29-
30-
## Extra help
31-
Here is the command to get more information on `go install`:
32-
- `go help install`
33-
34-
To get more information about the build flags:
35-
- `go help build`

0 commit comments

Comments
 (0)