Ability to resolve packages like logrus without using aliases
wjimenez5271 opened this issue · 1 comments
wjimenez5271 commented
I'm using an API compatible alternative to the standard go logging library, logrus
, however unless I use a import alias like so:
package main
import (
log "github.com/Sirupsen/logrus"
)
package resolution breaks. I'd like to be able to simply import the package directly
package main
import (
"github.com/Sirupsen/logrus"
)
and then use the API as usual:
log.Println("foo")
and see the IDE be able to resolve log
to the logrus
package.
zolotov commented
The package name of logrus package is logrus
, not log
: https://github.com/sirupsen/logrus/blob/master/logger.go#L1
This is what you can do without alias:
package main
import (
"github.com/Sirupsen/logrus"
)
func _() {
logrus.Println("foo")
}