fix(cicd): refactor scripts for cicd

This commit is contained in:
hexxa 2021-09-14 16:24:14 +08:00 committed by Hexxa
parent c897adc6ea
commit 2dc156cd95
11 changed files with 26 additions and 66 deletions

View file

@ -59,7 +59,7 @@ func NewServer(cfg gocfg.ICfg) (*Server, error) {
port := cfg.GrabInt("Server.Port")
portStr, ok := cfg.String("ENV.PORT")
if ok {
if ok && portStr != "" {
port, err = strconv.Atoi(portStr)
if err != nil {
panic(fmt.Sprintf("invalid port: %s", portStr))