endless icon indicating copy to clipboard operation
endless copied to clipboard

endless.NewServer() Struct Variable

Open Dentrax opened this issue 6 years ago • 2 comments

I want to make a struct like this:

type App struct {
	Server *endless.endlessServer
	Router *gin.Engine
}

func (a *App) Initialize(config *config.Config) {
	a.Server = endless.NewServer(fmt.Sprintf(":%d", a.Config.Server.Port), a.Router)
}

Using this struct: https://github.com/fvbock/endless/blob/master/endless.go#L72

But it's give me error:

cannot refer to unexported name *endless.endlessServer

How can i that endless reference in my own App struct?

Dentrax avatar Dec 12 '18 12:12 Dentrax