Skip to content

medtune/go-utils

Repository files navigation

Go-utils

CircleCI CodeFactor codecov

A set of Go libraries that provide low-level, independent packages supplementing the Go standard libs.

Purpose

This repository is intended to hold shared utilities with no Medtune dependence that may be of interest to any Go project.

Criteria for adding code here

  • Used by multiple repositories.

  • Full unit test coverage.

  • Go tools compliant (go get, go test, etc.).

  • Complex enough to be worth vendoring, rather than copying.

  • Stable, or backward compatible, API.

Libraries

  • Errors implementation to fit all use cases.

  • Math completing go math standard library.

  • Exec provides an interface for os/exec. It makes it easier to mock and replace in tests, especially with the FakeExec struct.

  • Cert provide base functionnalities for creating certificates.

  • Temp provides an interface to create temporary directories. It also provides a FakeDir implementation to replace in tests.

  • Clock provides an interface for time-based operations. It allows mocking time for testing.

  • Pointers provides some functions for pointer-based operations.

  • Crypto expose simple API for hash functionalities.

  • Random provide random generation mechanics for different types.

  • Regex provide predefined regex matching patterns.

Releases

No releases published

Packages

No packages published