Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

endless.NewServer() Struct Variable #44

Open
Dentrax opened this issue Dec 12, 2018 · 0 comments
Open

endless.NewServer() Struct Variable #44

Dentrax opened this issue Dec 12, 2018 · 0 comments

Comments

@Dentrax
Copy link

Dentrax commented Dec 12, 2018

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant