Skip to content

endless.NewServer() Struct Variable #44

@Dentrax

Description

@Dentrax

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions