From d6c4339a0ec7fe9fec8ec0ae368895f8f43872e4 Mon Sep 17 00:00:00 2001 From: at15 Date: Sun, 28 Apr 2019 13:15:58 -0700 Subject: [PATCH] [doc] Remove oudated guides in README --- Dockerfile | 5 ++++- Makefile | 4 ---- README.md | 37 ++++++++----------------------------- directory.md | 1 - 4 files changed, 12 insertions(+), 35 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5ea2491..e7bb986 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,10 @@ # This Dockerfile is a demo of using go-dev to build a go binary using multi stage build # It is based on # https://docs.docker.com/v17.09/engine/userguide/eng-image/dockerfile_best-practices/#use-multi-stage-builds -FROM dyweb/go-dev:1.11.4 as builder +# +# The builder-image go-dev can be found in hack/go-dev +# Versions can be found on https://hub.docker.com/r/dyweb/go-dev/tags +FROM dyweb/go-dev:1.12.4 as builder LABEL maintainer="contact@dongyue.io" diff --git a/Makefile b/Makefile index e260852..c692cdf 100644 --- a/Makefile +++ b/Makefile @@ -11,10 +11,6 @@ test unit test generate generate code using gommon loc lines of code (cloc required, brew install cloc) -Dev first time: -dep-install install dependencies based on lock file -dep-update update dependency based on spec and code - Build: install install all binaries under ./cmd to $$GOPATH/bin build compile all binary to ./build for current platform diff --git a/README.md b/README.md index dd895bd..4a1eb46 100644 --- a/README.md +++ b/README.md @@ -17,42 +17,21 @@ Gommon is a collection of common util libraries written in Go. -It has the following components: - - [errors](errors) error wrapping, inspection, multi error (error list), common error types -- [log](log) fine grained level control and reasonable performance +- [log](log) per package logger with [reasonable performance](log/_benchmarks/README.md) - [noodle](noodle) embed static assets for web application with `.noodleignore` support - [generator](generator) render go template, generate methods for logger interface based on `gommon.yml` -- [structure](structure) data structure like Set etc. to go -- [util](util) small utils over standard libraries utils - -Legacy - -- [config v1](config) A YAML config reader with template support -- [log v1](legacy/log) A logrus like structured logger -- [runner](legacy/runner) A os/exec wrapper -- [requests](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](Gopkg.lock) - -- [go-yaml/yaml](https://github.com/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](https://github.com/antlr/antlr4) - - we also have a DSL work in progress [RCL: Reika Configuration Language](https://github.com/at15/reika/issues/49), which is like [HCL](https://github.com/hashicorp/hcl2) - -Removed +- [util](util) wrappers for standard libraries -- [pkg/errors](https://github.com/pkg/errors) for including context in error, removed in [#59](https://github.com/dyweb/gommon/pull/59) -replaced by `gommon/errors` +It has little third party dependencies, only [go-yaml/yaml](https://github.com/go-yaml/yaml) in [util/cast](util/cast), +[go-shellquote](github.com/kballard/go-shellquote) in [generator](generator), +other dependencies like cobra are only for cli, see [go.mod](go.mod). ## Development -- install go https://golang.org/ -- install dep https://github.com/golang/dep -- `make dep-install` -- `make test` +- requires go1.12+. go1.11.x should work as well, the Makefile set `GO111MODULE=on` so you can use in GOPATH +- `make help` +- [Directory layout](directory.md) ## License diff --git a/directory.md b/directory.md index e616af4..181c78a 100644 --- a/directory.md +++ b/directory.md @@ -6,7 +6,6 @@ - [doc](doc) style guide and developer log - [errors](errors) error wrapping, multi error and error inspection - [generator](generator) generating interface methods, render go template, execute shell command. -- [legacy](legacy) legacy code base - [noodle](noodle) embed static assets for go binary with .ignore file support - [playground](playground) test library and replay issues - [scripts](scripts) test scripts