Skip to content

Extended standard library for go projects

License

Notifications You must be signed in to change notification settings

neticdk/go-stdlib

Repository files navigation

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.

About

Extended standard library for go projects

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages