Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] parse conf by viper and bindata. #7

Merged
merged 1 commit into from
Mar 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ all: prepare lint test compile

# prepare阶段,下载非 Go 依赖,可单独执行命令: make prepare
prepare:
bash $(CURDIR)/scripts/install.sh golangcilint # 下载非 Go 依赖
bash $(CURDIR)/scripts/install.sh golangcilint # 下载非go pkg依赖
bash $(CURDIR)/scripts/install.sh gobindata
git version # 低于 2.17.1 可能不能正常工作
go env # 打印出 go 环境信息,可用于排查问题

Expand Down
2 changes: 1 addition & 1 deletion configs/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ server:
httpPort: "8008"
banner:
enable: true
bannerPath: "./configs/banner.txt"
bannerPath: "configs/banner.txt"
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ require (
github.com/fakeyanss/gron v0.0.0-20230218065849-95fc0f17a375
github.com/gin-gonic/gin v1.8.2
github.com/mitchellh/mapstructure v1.5.0
github.com/mix-go/xfmt v1.1.15
github.com/pkg/errors v0.9.1
github.com/rs/zerolog v1.28.0
github.com/spf13/viper v1.15.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peK
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/mix-go/xfmt v1.1.15 h1:MccORIwYHOhUPbJw6W7UvX5OWk9tJ/GMWqY8w7VQyXc=
github.com/mix-go/xfmt v1.1.15/go.mod h1:SaQWaPiQihcLpmBlLd2+q8RgofCJ5vJ87JD6f+en43c=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
Expand Down
298 changes: 298 additions & 0 deletions internal/config/asset.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading