common.go

module
v0.0.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2026 License: MIT

README

common.go

CI License Issues PRs Dependabot

Dependency-free utility packages shared across sweetrpg's Go services and libraries: generic slice mapping, environment variable helpers, structured logging setup, and common constants. It sits at the base of the platform's Go dependency graph - nearly every other sweetrpg Go module depends on it directly or transitively.

Install

go get github.com/sweetrpg/common.go

Packages

  • util - GetEnv/GetEnvInt (environment variable helpers with defaults), Map/NullMap (generic slice transforms)
  • logging - Init() configures a logf-backed logger from the LOG_LEVEL environment variable; Logger is the shared instance
  • constants - environment variable names and log-level values used by the packages above

Documentation

Package documentation: pkg.go.dev/github.com/sweetrpg/common.go. Test coverage reports are published to sweetrpg.github.io/common.go on every merge to develop.

Contributing

See CONTRIBUTING.md for the development workflow and RELEASE.md for how versions get cut.

Directories

Path Synopsis
Package constants adds constants for SweetRPG projects.
Package constants adds constants for SweetRPG projects.
Package logging provides logging setup and configuration.
Package logging provides logging setup and configuration.
Package util adds some utility functions.
Package util adds some utility functions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL