https://github.com/vodolaz095/pkg
shared golang packages
https://github.com/vodolaz095/pkg
go golang hoarding
Last synced: over 1 year ago
JSON representation
shared golang packages
- Host: GitHub
- URL: https://github.com/vodolaz095/pkg
- Owner: vodolaz095
- License: mit
- Created: 2024-12-31T11:21:37.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-03-17T10:09:39.000Z (over 1 year ago)
- Last Synced: 2025-03-17T10:30:34.574Z (over 1 year ago)
- Topics: go, golang, hoarding
- Language: Go
- Homepage:
- Size: 52.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
pkg
=====================================
[](https://github.com/vodolaz095/pkg/actions/workflows/go.yml)
[](https://pkg.go.dev/github.com/vodolaz095/pkg?tab=doc)
[](https://goreportcard.com/report/github.com/vodolaz095/pkg)
Various functions copy-pasted between different projects.
See example: [example.go](example%2Fexample.go)
cryptorand
=======================================
Generate cryptographically secure random strings with alphabet provided
Documentation: https://pkg.go.dev/github.com/vodolaz095/pkg/cryptorand
date
=======================================
Date and time helpers - see [moments_test.go](date%2Fmoments_test.go)
Documentation: https://pkg.go.dev/github.com/vodolaz095/pkg/date
healthcheck
=======================================
Systemd compatible healthcheck.
Documentation: https://www.freedesktop.org/software/systemd/man/latest/sd_notify.html
Usage example:
https://github.com/vodolaz095/stocks_broadcaster/blob/a03cf70efc1e333e959f58bd295aa2701cca37c8/main.go#L131-L160
math
=======================================
Various generic mathematical functions copy-pasted between different projects.
Documentation: https://pkg.go.dev/github.com/vodolaz095/pkg/math
stopper
=======================================
Make global application context which can be terminated by signals
Documentation: https://pkg.go.dev/github.com/vodolaz095/pkg/stopper
tracing
=======================================
Opinionated way to configure OpenTelemetry with `jaegertracing/all-in-one` started with docker compose like this
```yaml
version: "3.11"
volumes:
jaeger_temp:
services:
jaeger:
container_name: jaeger
image: docker.io/jaegertracing/all-in-one:1.67.0
volumes:
- jaeger_temp:/tmp
ports:
- "16686:16686/tcp" # webui is listening
- "14268:14268/tcp" # accepting spans in compact jaeger thrift format over http
- "4318:4318/tcp" # accepting spans in OTLP format over http
# - "6831:6831/udp" # accepting spans in compact jaeger thrift format over udp - deprecated
```
See example: [example.go](example%2Fexample.go)
zerologger
=======================================
Opinionated way to configure zerolog with sane defaults
Documentation: https://pkg.go.dev/github.com/vodolaz095/pkg/zerologger
Usage example: [zerologger_test.go](zerologger%2Fzerologger_test.go)