A collection of common util libraries for Go
Clone or download
at15 [doc] Add changelog for 0.0.9
- update roadmap, move unfinished to 0.0.10
Latest commit 86998fd Dec 30, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github [httputil] Add type for method and factory funcs Dec 28, 2018
build [log][cli] Allow disable color Dec 31, 2018
cmd [cmd] Add add-build-ignore Fix #105 Dec 30, 2018
doc [doc] Add banner for gommon by @at15 Dec 29, 2018
errors [cmd] Add add-build-ignore Fix #105 Dec 30, 2018
generator [log][bench] Add caller increased 3 times Dec 9, 2018
legacy [log][cli] Allow disable color Dec 31, 2018
log [log][json] Make json.Handler not exported Dec 31, 2018
noodle [log][bench] Add caller increased 3 times Dec 9, 2018
playground [log][doc] Add log registry & filter in handler Dec 8, 2018
scripts [test] Fix broken dockerized test Aug 11, 2018
structure [doc] Add canonical import paths May 4, 2018
util [httputil] Add unix transport without pool Dec 30, 2018
.dockerignore [build] Add Dockerfile for gommon itself #98 Dec 31, 2018
.editorconfig [go] Drop support for go1.7 and go1.8 only go1.9 Feb 1, 2018
.gitignore [log] Remove map of child loggers #33 #78 Dec 8, 2018
.travis.yml [test] Remove go1.10 and add goimports Dec 31, 2018
CHANGELOG.md [doc] Add changelog for 0.0.9 Dec 31, 2018
Dockerfile [build] Add Dockerfile for gommon itself #98 Dec 31, 2018
Gopkg.lock [generator] Rewriting GenerateSingle Aug 27, 2018
Gopkg.toml Replace pkg/errors -> gommon/errors Feb 25, 2018
LICENSE [doc] Add MIT license and acknowledgement Mar 28, 2017
Makefile [doc] Add changelog for 0.0.9 Dec 31, 2018
README.md [doc] Add changelog for 0.0.9 Dec 31, 2018
ROADMAP.md [doc] Add changelog for 0.0.9 Dec 31, 2018
directory.md [errors] Add errortype subpackage Dec 30, 2018
go.mod [legacy] Ignore legacy pkgs using build tag #105 Dec 30, 2018
go.sum [legacy] Ignore legacy pkgs using build tag #105 Dec 30, 2018

README.md

Gommon - Go common libraries


gommon


GoDoc Build Status codecov Go Report Card loc FOSSA Status

Gommon is a collection of common util libraries written in Go.

It has the following components:

  • errors error wrapping, inspection, multi error (error list), common error types
  • log fine grained level control and reasonable performance
  • noodle embed static assets for web application with .noodleignore support
  • generator render go template, generate methods for logger interface based on gommon.yml
  • structure data structure like Set etc. to go
  • util small utils over standard libraries utils

Legacy

  • config v1 A YAML config reader with template support
  • log v1 A logrus like structured logger
  • runner A os/exec wrapper
  • requests A pythonic wrapper for net/http, HTTP for Gopher

Dependencies

Currently we only have one non standard library dependencies (cmd and examples are not considered), see Gopkg.lock

  • go-yaml/yaml for read config written in YAML
    • we don't need most feature of YAML, and want to have access to the parser directly to report which line has incorrect semantic (after checking it in application).
      • might write one in ANTLR
    • we also have a DSL work in progress RCL: Reika Configuration Language, which is like HCL

Removed

  • pkg/errors for including context in error, removed in #59 replaced by gommon/errors

Development

License

MIT

FOSSA Status

Contribution

Currently, gommon is in a very violate state, please open issues after it becomes stable.

About

Gommon is inspired by many existing libraries, attribution and comparision can be found in doc/attribution.

Gommon was part of Ayi and split out for wider use. The name Gommon is suggested by @arrowrowe. The original blog post can be found in dongyue web's blog. Thanks all the folks in @dyweb especially @gaocegege for their support in early development.