Skip to content

Commit

Permalink
optimize and test
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengshuxin committed Jan 5, 2022
1 parent c8f26f4 commit ad3d9c9
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
1 change: 1 addition & 0 deletions examples/gin-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ func main() {
gin.SetMode(gin.ReleaseMode)
}

fmt.Println("addr:", *addresses)
service, err := master_gin.Init(*addresses, onStop)
if err != nil {
fmt.Println("Init master gin service failed:", err)
Expand Down
4 changes: 0 additions & 4 deletions gin_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ func Init(addresses string, stopHandler func(bool)) (*GinService, error) {
return nil, errors.New("Listening addresses shouldn't be empty in alone mode")
}

if !master.Alone {
addresses = ""
}

listeners, err := master.ServiceInit(addresses, stopHandler)
if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/acl-dev/master-gin
go 1.16

require (
github.com/acl-dev/master-go v1.0.6
github.com/acl-dev/master-go v1.0.7
github.com/gin-gonic/gin v1.7.7
github.com/pkg/errors v0.9.1
)

0 comments on commit ad3d9c9

Please sign in to comment.