From 690e52b4b587fd199a49e1afe788c10c8db9111e Mon Sep 17 00:00:00 2001 From: Zhenzhen Zhao Date: Thu, 24 Jun 2021 14:44:00 +0800 Subject: [PATCH] [chore] change package name (#22) * chore: change package name to `deb-sig/double-entry-generator` Signed-off-by: Triple-Z * add CODEOWNERS file - add `help` target in Makefile Signed-off-by: Triple-Z * update CODEOWNERS Signed-off-by: Triple-Z --- CODEOWNERS | 15 +++++++++++++++ Makefile | 11 +++++++---- README.md | 4 ++-- go.mod | 2 +- hack/generate-doc.go | 2 +- main.go | 2 +- pkg/analyser/alipay/alipay.go | 6 +++--- pkg/analyser/huobi/huobi.go | 6 +++--- pkg/analyser/interface.go | 12 ++++++------ pkg/analyser/wechat/wechat.go | 6 +++--- pkg/cmd/translate.go | 8 ++++---- pkg/cmd/version.go | 2 +- pkg/compiler/beancount/compiler.go | 6 +++--- pkg/compiler/interface.go | 10 +++++----- pkg/config/config.go | 6 +++--- pkg/provider/alipay/alipay.go | 2 +- pkg/provider/alipay/convert.go | 2 +- pkg/provider/huobi/convert.go | 2 +- pkg/provider/huobi/huobi.go | 2 +- pkg/provider/interface.go | 10 +++++----- pkg/provider/wechat/convert.go | 2 +- pkg/provider/wechat/wechat.go | 2 +- 22 files changed, 69 insertions(+), 51 deletions(-) create mode 100644 CODEOWNERS diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..579e8a2 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,15 @@ +# ref to https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-code-owners + +* @deb-sig/generator-dev + +/.github/ @gaocegege @Triple-Z + +/hack/ @gaocegege + +/doc/ @gaocegege + +Makefile @gaocegege @Triple-Z + +*.go @gaocegege @Triple-Z + +/pkg/ @gaocegege @Triple-Z diff --git a/Makefile b/Makefile index d0fa17b..5e888e7 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ # Ref https://github.com/caicloud/golang-template-project/blob/master/Makefile # This repo's root import path (under GOPATH). -ROOT := github.com/gaocegege/double-entry-generator +ROOT := github.com/deb-sig/double-entry-generator # Target binaries. You can build multiple binaries for a single project. TARGETS := double-entry-generator @@ -43,9 +43,12 @@ BIN_DIR := $(GOPATH)/bin GOLANGCI_LINT := $(BIN_DIR)/golangci-lint # All targets. -.PHONY: lint test build container push +.PHONY: lint test build container push help -build: build-local +help: ## Display this help + @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n"} /^[a-zA-Z0-9_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) + +build: build-local ## Build the project build-local: @for target in $(TARGETS); do \ @@ -56,6 +59,6 @@ build-local: $(CMD_DIR)/; \ done -install: build +install: build ## Install the double-entry-generator binary @install ./bin/double-entry-generator /usr/local/bin @echo "Installed double-entry-generator at /usr/local/bin/double-entry-generator !" diff --git a/README.md b/README.md index 8ccdc51..9215f95 100644 --- a/README.md +++ b/README.md @@ -23,11 +23,11 @@ ## 安装 -在 [GitHub Release](https://github.com/gaocegege/double-entry-generator/releases) 页面中下载相应架构的二进制文件到本地即可。 +在 [GitHub Release](https://github.com/deb-sig/double-entry-generator/releases) 页面中下载相应架构的二进制文件到本地即可。 源码安装: ```bash -go get -u github.com/gaocegege/double-entry-generator +go get -u github.com/deb-sig/double-entry-generator ``` ## 使用 diff --git a/go.mod b/go.mod index 32320cd..da6f35a 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/gaocegege/double-entry-generator +module github.com/deb-sig/double-entry-generator go 1.12 diff --git a/hack/generate-doc.go b/hack/generate-doc.go index dd0de87..86fc530 100644 --- a/hack/generate-doc.go +++ b/hack/generate-doc.go @@ -3,7 +3,7 @@ package main import ( "log" - "github.com/gaocegege/double-entry-generator/pkg/cmd" + "github.com/deb-sig/double-entry-generator/pkg/cmd" "github.com/spf13/cobra/doc" ) diff --git a/main.go b/main.go index e2e0967..1abc311 100644 --- a/main.go +++ b/main.go @@ -15,7 +15,7 @@ limitations under the License. */ package main -import "github.com/gaocegege/double-entry-generator/pkg/cmd" +import "github.com/deb-sig/double-entry-generator/pkg/cmd" func main() { cmd.Execute() diff --git a/pkg/analyser/alipay/alipay.go b/pkg/analyser/alipay/alipay.go index 09ae772..1e42810 100644 --- a/pkg/analyser/alipay/alipay.go +++ b/pkg/analyser/alipay/alipay.go @@ -3,9 +3,9 @@ package alipay import ( "strings" - "github.com/gaocegege/double-entry-generator/pkg/config" - "github.com/gaocegege/double-entry-generator/pkg/ir" - "github.com/gaocegege/double-entry-generator/pkg/util" + "github.com/deb-sig/double-entry-generator/pkg/config" + "github.com/deb-sig/double-entry-generator/pkg/ir" + "github.com/deb-sig/double-entry-generator/pkg/util" ) type Alipay struct { diff --git a/pkg/analyser/huobi/huobi.go b/pkg/analyser/huobi/huobi.go index c7acad4..64ee065 100644 --- a/pkg/analyser/huobi/huobi.go +++ b/pkg/analyser/huobi/huobi.go @@ -1,9 +1,9 @@ package huobi import ( - "github.com/gaocegege/double-entry-generator/pkg/config" - "github.com/gaocegege/double-entry-generator/pkg/ir" - "github.com/gaocegege/double-entry-generator/pkg/util" + "github.com/deb-sig/double-entry-generator/pkg/config" + "github.com/deb-sig/double-entry-generator/pkg/ir" + "github.com/deb-sig/double-entry-generator/pkg/util" ) type Huobi struct { diff --git a/pkg/analyser/interface.go b/pkg/analyser/interface.go index b31b0f9..41b3158 100644 --- a/pkg/analyser/interface.go +++ b/pkg/analyser/interface.go @@ -3,12 +3,12 @@ package analyser import ( "fmt" - "github.com/gaocegege/double-entry-generator/pkg/analyser/alipay" - "github.com/gaocegege/double-entry-generator/pkg/analyser/huobi" - "github.com/gaocegege/double-entry-generator/pkg/analyser/wechat" - "github.com/gaocegege/double-entry-generator/pkg/config" - "github.com/gaocegege/double-entry-generator/pkg/consts" - "github.com/gaocegege/double-entry-generator/pkg/ir" + "github.com/deb-sig/double-entry-generator/pkg/analyser/alipay" + "github.com/deb-sig/double-entry-generator/pkg/analyser/huobi" + "github.com/deb-sig/double-entry-generator/pkg/analyser/wechat" + "github.com/deb-sig/double-entry-generator/pkg/config" + "github.com/deb-sig/double-entry-generator/pkg/consts" + "github.com/deb-sig/double-entry-generator/pkg/ir" ) // Interface is the interface of analyser. diff --git a/pkg/analyser/wechat/wechat.go b/pkg/analyser/wechat/wechat.go index bad28aa..084a047 100644 --- a/pkg/analyser/wechat/wechat.go +++ b/pkg/analyser/wechat/wechat.go @@ -1,9 +1,9 @@ package wechat import ( - "github.com/gaocegege/double-entry-generator/pkg/config" - "github.com/gaocegege/double-entry-generator/pkg/ir" - "github.com/gaocegege/double-entry-generator/pkg/util" + "github.com/deb-sig/double-entry-generator/pkg/config" + "github.com/deb-sig/double-entry-generator/pkg/ir" + "github.com/deb-sig/double-entry-generator/pkg/util" ) type Wechat struct { diff --git a/pkg/cmd/translate.go b/pkg/cmd/translate.go index 0540644..687d2d4 100644 --- a/pkg/cmd/translate.go +++ b/pkg/cmd/translate.go @@ -24,10 +24,10 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" - "github.com/gaocegege/double-entry-generator/pkg/compiler" - "github.com/gaocegege/double-entry-generator/pkg/config" - "github.com/gaocegege/double-entry-generator/pkg/consts" - "github.com/gaocegege/double-entry-generator/pkg/provider" + "github.com/deb-sig/double-entry-generator/pkg/compiler" + "github.com/deb-sig/double-entry-generator/pkg/config" + "github.com/deb-sig/double-entry-generator/pkg/consts" + "github.com/deb-sig/double-entry-generator/pkg/provider" ) var ( diff --git a/pkg/cmd/version.go b/pkg/cmd/version.go index 6ef2410..8ba1e3a 100644 --- a/pkg/cmd/version.go +++ b/pkg/cmd/version.go @@ -5,7 +5,7 @@ import ( "github.com/spf13/cobra" - "github.com/gaocegege/double-entry-generator/pkg/version" + "github.com/deb-sig/double-entry-generator/pkg/version" ) func init() { diff --git a/pkg/compiler/beancount/compiler.go b/pkg/compiler/beancount/compiler.go index 2c65640..6dc424f 100644 --- a/pkg/compiler/beancount/compiler.go +++ b/pkg/compiler/beancount/compiler.go @@ -9,10 +9,10 @@ import ( "sort" "text/template" - "github.com/gaocegege/double-entry-generator/pkg/analyser" + "github.com/deb-sig/double-entry-generator/pkg/analyser" - "github.com/gaocegege/double-entry-generator/pkg/config" - "github.com/gaocegege/double-entry-generator/pkg/ir" + "github.com/deb-sig/double-entry-generator/pkg/config" + "github.com/deb-sig/double-entry-generator/pkg/ir" ) // BeanCount is the implementation. diff --git a/pkg/compiler/interface.go b/pkg/compiler/interface.go index b7d4deb..1ef5bcd 100644 --- a/pkg/compiler/interface.go +++ b/pkg/compiler/interface.go @@ -3,12 +3,12 @@ package compiler import ( "fmt" - "github.com/gaocegege/double-entry-generator/pkg/analyser" + "github.com/deb-sig/double-entry-generator/pkg/analyser" - "github.com/gaocegege/double-entry-generator/pkg/compiler/beancount" - "github.com/gaocegege/double-entry-generator/pkg/config" - "github.com/gaocegege/double-entry-generator/pkg/consts" - "github.com/gaocegege/double-entry-generator/pkg/ir" + "github.com/deb-sig/double-entry-generator/pkg/compiler/beancount" + "github.com/deb-sig/double-entry-generator/pkg/config" + "github.com/deb-sig/double-entry-generator/pkg/consts" + "github.com/deb-sig/double-entry-generator/pkg/ir" ) // Interface is the type for the compiler. diff --git a/pkg/config/config.go b/pkg/config/config.go index 8569bad..921f7b6 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -1,9 +1,9 @@ package config import ( - "github.com/gaocegege/double-entry-generator/pkg/provider/alipay" - "github.com/gaocegege/double-entry-generator/pkg/provider/huobi" - "github.com/gaocegege/double-entry-generator/pkg/provider/wechat" + "github.com/deb-sig/double-entry-generator/pkg/provider/alipay" + "github.com/deb-sig/double-entry-generator/pkg/provider/huobi" + "github.com/deb-sig/double-entry-generator/pkg/provider/wechat" ) // Config is the global configuration. diff --git a/pkg/provider/alipay/alipay.go b/pkg/provider/alipay/alipay.go index 8bba92d..344b53c 100644 --- a/pkg/provider/alipay/alipay.go +++ b/pkg/provider/alipay/alipay.go @@ -27,7 +27,7 @@ import ( "golang.org/x/text/encoding/simplifiedchinese" "golang.org/x/text/transform" - "github.com/gaocegege/double-entry-generator/pkg/ir" + "github.com/deb-sig/double-entry-generator/pkg/ir" ) // Alipay is the provider for alipay. diff --git a/pkg/provider/alipay/convert.go b/pkg/provider/alipay/convert.go index 068ed96..61e0fe8 100644 --- a/pkg/provider/alipay/convert.go +++ b/pkg/provider/alipay/convert.go @@ -3,7 +3,7 @@ package alipay import ( "fmt" - "github.com/gaocegege/double-entry-generator/pkg/ir" + "github.com/deb-sig/double-entry-generator/pkg/ir" ) // convertToIR convert alipay bills to IR. diff --git a/pkg/provider/huobi/convert.go b/pkg/provider/huobi/convert.go index e095169..d6d142f 100644 --- a/pkg/provider/huobi/convert.go +++ b/pkg/provider/huobi/convert.go @@ -1,6 +1,6 @@ package huobi -import "github.com/gaocegege/double-entry-generator/pkg/ir" +import "github.com/deb-sig/double-entry-generator/pkg/ir" func (h *Huobi) convertToIR() *ir.IR { i := ir.New() diff --git a/pkg/provider/huobi/huobi.go b/pkg/provider/huobi/huobi.go index 5b21aef..251e7d7 100644 --- a/pkg/provider/huobi/huobi.go +++ b/pkg/provider/huobi/huobi.go @@ -8,7 +8,7 @@ import ( "log" "os" - "github.com/gaocegege/double-entry-generator/pkg/ir" + "github.com/deb-sig/double-entry-generator/pkg/ir" ) type Huobi struct { diff --git a/pkg/provider/interface.go b/pkg/provider/interface.go index ccbb727..da73578 100644 --- a/pkg/provider/interface.go +++ b/pkg/provider/interface.go @@ -19,11 +19,11 @@ package provider import ( "fmt" - "github.com/gaocegege/double-entry-generator/pkg/consts" - "github.com/gaocegege/double-entry-generator/pkg/ir" - "github.com/gaocegege/double-entry-generator/pkg/provider/alipay" - "github.com/gaocegege/double-entry-generator/pkg/provider/huobi" - "github.com/gaocegege/double-entry-generator/pkg/provider/wechat" + "github.com/deb-sig/double-entry-generator/pkg/consts" + "github.com/deb-sig/double-entry-generator/pkg/ir" + "github.com/deb-sig/double-entry-generator/pkg/provider/alipay" + "github.com/deb-sig/double-entry-generator/pkg/provider/huobi" + "github.com/deb-sig/double-entry-generator/pkg/provider/wechat" ) // Interface is the interface for the provider. diff --git a/pkg/provider/wechat/convert.go b/pkg/provider/wechat/convert.go index ad8dc24..1c8b829 100644 --- a/pkg/provider/wechat/convert.go +++ b/pkg/provider/wechat/convert.go @@ -1,7 +1,7 @@ package wechat import ( - "github.com/gaocegege/double-entry-generator/pkg/ir" + "github.com/deb-sig/double-entry-generator/pkg/ir" ) // convertToIR convert wechat bills to IR. diff --git a/pkg/provider/wechat/wechat.go b/pkg/provider/wechat/wechat.go index 2eda17f..3cb9d14 100644 --- a/pkg/provider/wechat/wechat.go +++ b/pkg/provider/wechat/wechat.go @@ -8,7 +8,7 @@ import ( "log" "os" - "github.com/gaocegege/double-entry-generator/pkg/ir" + "github.com/deb-sig/double-entry-generator/pkg/ir" ) // Wechat is the provider for Wechat.