Skip to content

triple-a/gocom

 
 

Repository files navigation

triple-a/gocom

security scanner linter tests conv commits checker codecov

common golang packages

Import path migration

The active module namespace is now github.com/triple-a/gocom/.... Existing consumers using the historical github.com/induzo/gocom/... import paths must update their imports before adopting new releases from this repository.

Current modules

module benchmarks latest version report docs
database/pginit benches 2.2.34 Go Report Card Go Reference
database/pgx-slog benches 1.0.38 Go Report Card Go Reference
http/health benches 1.2.0 Go Report Card Go Reference
http/middleware/valkeydempotency benches 0.4.9 Go Report Card Go Reference
http/middleware/idempotency benches 0.10.0 Go Report Card Go Reference
http/middleware/writablecontext benches 0.2.0 Go Report Card Go Reference
shutdown benches 1.3.5 Go Report Card Go Reference

How to use any of these private modules

Force the use of ssh instead of https for git:

git config --global --add url."git@github.com:".insteadOf "https://github.com/"

Allow internal repositories under a private company, simply add this line to your .zshrc or other, accordingly:

export GOPRIVATE="github.com/triple-a/*"

GOPRIVATE implies GONOSUMDB and GONOSUMCHECK for the same pattern, so no additional variables are needed.

Using from auberun

Consume these modules directly by versioned module tags:

go get github.com/triple-a/gocom/http/health@v1.2.0
go get github.com/triple-a/gocom/http/middleware/idempotency@v0.10.0
go get github.com/triple-a/gocom/database/pginit/v2@v2.2.34

If auberun uses CI, configure GOPRIVATE (and optionally GONOSUMDB) in the CI environment, and ensure git can authenticate to private GitHub repos.

How to add a new module

Let's take an example of an opentelemetry module.

  • Make sure the module is fully tested (at least 95% coverage, try to reach 100%), linted
  • Create a branch feat/opentelemetry
  • Copy in the right folder (that's quite subjective), in our case, ./monitoring/otelinit
  • Add it to the workspace
    go work use ./monitoring/otelinit
  • Add your file, commit your files (respecting conventional commits) and tag the commit properly, according to a semantic versioning
    git add ./monitoring/otelinit
    git commit -m "feat: add monitoring opentelemetry module" ./monitoring/otelinit
    git tag "monitoring/otelinit/v1.0.0"
  • Create a pull request
  • Wait for review

Dependency graph

Depends on database/pgx-slog

  • database/pginit

Depends on http/middleware/idempotency

  • http/middleware/valkeydempotency

Contribution

pre-commit install -t commit-msg -t pre-commit -t pre-push

About

golang common libraries

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Go 96.4%
  • Makefile 3.6%