proto-socket/examples/go-module-consumer/README.md

39 lines
680 B
Markdown

# Go Module Consumer
Minimal scaffold for consuming Proto Socket from another Go project.
## Private Registry Setup
This module path is hosted on a private Forgejo instance.
```bash
go env -w GOPRIVATE=git.toki-labs.com
go env -w GONOSUMDB=git.toki-labs.com
```
If authentication is required, configure either `~/.netrc`:
```text
machine git.toki-labs.com
login toki
password <personal_access_token>
```
or a Git URL rewrite:
```bash
git config --global url."https://toki@git.toki-labs.com/".insteadOf "https://git.toki-labs.com/"
```
## Install Or Update
```bash
go get git.toki-labs.com/toki/common-proto-socket/go@latest
go mod tidy
```
## Run
```bash
go run .
```