Skip to content

Conversation

@mocheryl
Copy link

Consider the following code:

package main

import (
    "github.com/nsf/termbox-go"
    g "github.com/quantum/gonsole"
)

func main() {
    app := g.NewApp()
    app.CloseKey = termbox.KeyCtrlQ

    app.Run()
}

It will not compile outside of gonsole directory because the termbox
type used here does not match the one used in the vendor directory.

According to some discussions I found, such behavior should be
restricted to main applications only. Libraries in this case should
either un-vendor the package or wrap all the exported types.

Consider the following code:

    package main

    import (
        "github.com/nsf/termbox-go"
        g "github.com/quantum/gonsole"
    )

    func main() {
        app := g.NewApp()
        app.CloseKey = termbox.KeyCtrlQ

        app.Run()
    }

It will not compile outside of gonsole directory because the termbox
type used here does not match the one used in the vendor directory.

According to some discussions I found, such behavior should be
restricted to main applications only. Libraries in this case should
either un-vendor the package or wrap all the exported types.
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

Successfully merging this pull request may close these issues.

1 participant