Closed walkerxiong closed 3 years ago
I have a doubt, why the function is called twice in the go-server pkg, is it necessary ? for example: helloworld/go-server/cmd/server.go
go-server
helloworld/go-server/cmd/server.go
func main() { > hessian.RegisterPOJO(&pkg.User{}) config.Load() initSignal() }
but in the helloworld/pkg/user.go
helloworld/pkg/user.go
func init() { config.SetProviderService(new(UserProvider)) // ------for hessian2------ > hessian.RegisterPOJO(&User{}) }
It's a wrong guide. we should improve it.
I have a doubt, why the function is called twice in the
go-server
pkg, is it necessary ? for example:helloworld/go-server/cmd/server.go
but in the
helloworld/pkg/user.go