How to fix the error message "use of internal package is not allowed" when you receive golang package?

I am using go 1.5.3. I ran this

go get -x github.com/goji/goji

and I get this error message:

git checkout master
package github.com/goji/goji
imports goji.io/internal: use of internal package not allowed

How to resolve this?

+5
source share
1 answer

From this goji issue 13 right command:

go get goji.io

This page http://goji.io/has a meta directive go-import:

<meta name="go-import" content="goji.io git https://github.com/goji/goji">

Thus, go does not take into account goji.io/internal(see, for example router.go), because it is trying to import the internal package of the “third party it.”
This problem illustrates the wrong internal import:

You are not allowed to import the internal package (or its subpackages) of a third-party repo.

+4

Source: https://habr.com/ru/post/1625698/


All Articles