Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
gommon
command
gommon is the commandline util for generator
|
gommon is the commandline util for generator |
|
Package errors provides multi error, error wrapping.
|
Package errors provides multi error, error wrapping. |
|
Package generator render go template, call external commands, generate gommon specific methods based on gommon.yml
|
Package generator render go template, call external commands, generate gommon specific methods based on gommon.yml |
|
Package legacy contains deprecated gommon packages
|
Package legacy contains deprecated gommon packages |
|
config
Package config supports go text/template, environment and self defined variables
|
Package config supports go text/template, environment and self defined variables |
|
log
Package log(Deprecated) can filter log by field and support multiple level
|
Package log(Deprecated) can filter log by field and support multiple level |
|
runner
Package runner(Deprecated) run commands with some convention
|
Package runner(Deprecated) run commands with some convention |
|
Package log provides structured logging with fine grained control over libraries using a tree of logger registry TODO: add convention and usage
|
Package log provides structured logging with fine grained control over libraries using a tree of logger registry TODO: add convention and usage |
|
_benchmarks
Package benchmarks provides benchmark using go test and simulated real environment using pprof
|
Package benchmarks provides benchmark using go test and simulated real environment using pprof |
|
_examples/simple
command
|
|
|
_examples/uselib
command
|
|
|
handlers/cli
Package cli writes is same as builtin TextHandler except color and delta time.
|
Package cli writes is same as builtin TextHandler except color and delta time. |
|
handlers/json
Package json writes log in JSON format, it concatenates string directly and does not use encoding/json.
|
Package json writes log in JSON format, it concatenates string directly and does not use encoding/json. |
|
Package noodle helps embedding static assets into go binary, it supports using ignore file
|
Package noodle helps embedding static assets into go binary, it supports using ignore file |
|
_examples/embed
command
|
|
|
_examples/embed_by_hand
command
|
|
|
_examples/local
command
|
|
|
Package playground is used for testing out issues and language features
|
Package playground is used for testing out issues and language features |
|
issue_noodle_50
command
for i, ele := range slice is reusing same struct https://github.com/dyweb/gommon/issues/50
|
for i, ele := range slice is reusing same struct https://github.com/dyweb/gommon/issues/50 |
|
stdlib/http_status
command
|
|
|
Package requests is a wrapper around net/http with less public global variables Package requests wrap net/http like requests did for python it is easy to use, but not very efficient
|
Package requests is a wrapper around net/http with less public global variables Package requests wrap net/http like requests did for python it is easy to use, but not very efficient |
|
Package structure add some missing common data structures to Golang
|
Package structure add some missing common data structures to Golang |
|
util
|
|
|
cast
Package cast convert types safely and drop incompatible types during conversion it is inspired by https://github.com/spf13/cast
|
Package cast convert types safely and drop incompatible types during conversion it is inspired by https://github.com/spf13/cast |
|
color
Package color defines color code for pretty print in linux shell, windows is not supported
|
Package color defines color code for pretty print in linux shell, windows is not supported |
|
envutil
Package envutil wraps environment variable related operations
|
Package envutil wraps environment variable related operations |
|
fsutil
Package fsutil adds ignore support for walk
|
Package fsutil adds ignore support for walk |
|
genutil
Package genutil contains helper when generating files, it is used to break dependency cycle between generator package and packages that contain generator logic like log, noodle
|
Package genutil contains helper when generating files, it is used to break dependency cycle between generator package and packages that contain generator logic like log, noodle |
|
hashutil
Package hashutil provides alloc free alternatives for pkg/hash
|
Package hashutil provides alloc free alternatives for pkg/hash |
|
httputil
Package httputil provides helper for net/http, i.e.
|
Package httputil provides helper for net/http, i.e. |
|
logutil
Package logutil is a registry of loggers, it is required for all lib and app that use gommon/log.
|
Package logutil is a registry of loggers, it is required for all lib and app that use gommon/log. |
|
maputil
Package maputil provides wrapper for common map operations like merge, get keys, due to Go's type system only map[string]string is supported
|
Package maputil provides wrapper for common map operations like merge, get keys, due to Go's type system only map[string]string is supported |
|
runtimeutil
Package runtimeutil provides wrapper to get caller, stack etc.
|
Package runtimeutil provides wrapper to get caller, stack etc. |
|
testutil
Package testutil defines helper functions that fails test instead of return error
|
Package testutil defines helper functions that fails test instead of return error |
Click to show internal directories.
Click to hide internal directories.