bots-garden/hellopublic Fork 0
main
Commits
Clone
git clone https://git.rickub.com/bots-garden/hello.git
git clone ssh://git@rickub.com/bots-garden/hello.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

📦 Hello 0368b85 · on main · k33g · 2h ago
README.md · 28 lines · 655 Bmarkdown
Blame HistoryOpen raw

hello

A Go library that greets somebody by name.

import "rickub.com/bots-garden/hello"

hello.Greet("Bob")     // "Hello, Bob!"
hello.Greet("  Bob ")  // "Hello, Bob!"  — surrounding whitespace is dropped
hello.Greet("")        // "Hello, world!" — an empty name is greeted as the world

Using it from another module

rickub.com serves neither a go-import meta tag nor git over HTTPS, so
go get cannot resolve this path on its own yet. Until it can, depend on a
checkout beside yours — a workspace, which changes no tracked file:

go work init . ../hello

Build and test

go test ./...
go vet ./...
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# hello

A Go library that greets somebody by name.

```go
import "rickub.com/bots-garden/hello"

hello.Greet("Bob")     // "Hello, Bob!"
hello.Greet("  Bob ")  // "Hello, Bob!"  — surrounding whitespace is dropped
hello.Greet("")        // "Hello, world!" — an empty name is greeted as the world
```

## Using it from another module

`rickub.com` serves neither a `go-import` meta tag nor git over HTTPS, so
`go get` cannot resolve this path on its own yet. Until it can, depend on a
checkout beside yours — a workspace, which changes no tracked file:

```bash
go work init . ../hello
```

## Build and test

```bash
go test ./...
go vet ./...
```