| 📦 Hello 0368b85 k33g 4h ago | 1 | # hello |
| 2 | |
| 3 | A Go library that greets somebody by name. |
| 4 | |
| 5 | ```go |
| 6 | import "rickub.com/bots-garden/hello" |
| 7 | |
| 8 | hello.Greet("Bob") // "Hello, Bob!" |
| 9 | hello.Greet(" Bob ") // "Hello, Bob!" — surrounding whitespace is dropped |
| 10 | hello.Greet("") // "Hello, world!" — an empty name is greeted as the world |
| 11 | ``` |
| 12 | |
| 13 | ## Using it from another module |
| 14 | |
| 15 | `rickub.com` serves neither a `go-import` meta tag nor git over HTTPS, so |
| 16 | `go get` cannot resolve this path on its own yet. Until it can, depend on a |
| 17 | checkout beside yours — a workspace, which changes no tracked file: |
| 18 | |
| 19 | ```bash |
| 20 | go work init . ../hello |
| 21 | ``` |
| 22 | |
| 23 | ## Build and test |
| 24 | |
| 25 | ```bash |
| 26 | go test ./... |
| 27 | go vet ./... |
| 28 | ``` |