Skip to content

Commit

Permalink
refact(version): change version location
Browse files Browse the repository at this point in the history
  • Loading branch information
Matrix-X committed Oct 15, 2023
1 parent 615c250 commit cd2a816
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions etc/powerx-example.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Version: v1.0.0 # 版本
Server:
Name: PowerX后台系统 # 服务器名称
Host: 0.0.0.0 # 服务器地址
Expand Down
11 changes: 6 additions & 5 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,12 @@ type Root struct {
}

type Config struct {
Server rest.RestConf
EtcDir string `json:",optional"`
Log zerox.LogConf
Cors Cors
JWT struct {
Version string
Server rest.RestConf
EtcDir string `json:",optional"`
Log zerox.LogConf
Cors Cors
JWT struct {
JWTSecret string
MPJWTSecret string
WebJWTSecret string
Expand Down
2 changes: 1 addition & 1 deletion internal/logic/gethomelogic.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ func (l *GetHomeLogic) GetHome() (resp *types.GetHomeReply, err error) {
return &types.GetHomeReply{
Greet: "Hello, I am PowerX!",
Description: "This is awesome! you create me and make me alive",
Version: "V1.0.1",
Version: l.svcCtx.Config.Version,
}, nil
}

0 comments on commit cd2a816

Please sign in to comment.