go-stdlib

module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2025 License: MIT

README

Netic go standard library

GitHub Tag CI Go Reference Go Report Card License

The Netic go standard library is an extension to the go standard library. It comes in the form of a collection of packages.

Dependencies

The packages are dependency free meaning. Packages added to this module must not use any external dependencies unless listed below.

Exceptions:

  • golang.org/x/* - maintained by go and dependency free

CI checks the imports against regular expressions found in the .allowed-imports file. To allow new imports, add them to the .allowed-imports file in a separate PR.

Do NOT add exceptions to this list without peer review.

Package names

  • Prefix names for packages that mirror a go standard library package with x.
  • Prefix names for packages that are likely to mirror future go standard library Packages with x.
  • Use singular names for package (except in the mentioned cases).

Testing

  • Unit testing is mandatory.
  • Go for > 95% coverage, preferably 100%.

Documentation

  • Document all exported (public) identifiers
  • Maintain a doc.go in each package with introduction, installation instructions and usage examples.
  • Use make gen to generate README.md files
doc.go minimal content
// Package mypkg does ...
package mypkg

Packages

  • assert / require - test helpers for assertion
  • diff / diff/myers / diff/simple - generate diffs
  • file - file operations
  • set - set data structure
  • unit - unit formatting and conversion package
  • version - version functions
  • xjson - JSON functions
  • xslices - slice data type functions
  • xstrings - string data type functions
  • xstructs - struct data type functions

Installation

Install using go get:

go get github.com/neticdk/go-stdlib

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

Link to license or copyright notice

Copyright 2025 Netic A/S. All rights reserved.

Directories

Path Synopsis
Package assert provides a collection of assertion helpers designed to integrate seamlessly with the Go standard testing package.
Package assert provides a collection of assertion helpers designed to integrate seamlessly with the Go standard testing package.
Package diff provides implementations for computing the differences between strings or string slices.
Package diff provides implementations for computing the differences between strings or string slices.
myers
Package myers implements the Myers' diff algorithm.
Package myers implements the Myers' diff algorithm.
simple
Package simple provides a straightforward implementation of a diff algorithm for comparing strings or string slices.
Package simple provides a straightforward implementation of a diff algorithm for comparing strings or string slices.
Package require provides assertion functions that wrap the functions from the `is` package.
Package require provides assertion functions that wrap the functions from the `is` package.
Package unit provides utilities for handling units including human-readable unit formatting, parsing, and registration of custom units and formatting systems.
Package unit provides utilities for handling units including human-readable unit formatting, parsing, and registration of custom units and formatting systems.
Package version provides functionality to work with versions.
Package version provides functionality to work with versions.
Package xjson provides functionality for working with JSON.
Package xjson provides functionality for working with JSON.
Package xslices provides functionality for working with slices.
Package xslices provides functionality for working with slices.
Package xstrings provides functionality for working with strings.
Package xstrings provides functionality for working with strings.
transliterate
Package transliterate provides functionality to convert Unicode text into plain ASCII equivalents.
Package transliterate provides functionality to convert Unicode text into plain ASCII equivalents.
transliterate/internal/table
Package table contains the generated transliteration data for the transliterate package.
Package table contains the generated transliteration data for the transliterate package.
Package xstructs provides functionality for working with structs.
Package xstructs provides functionality for working with structs.

Jump to

Keyboard shortcuts

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