Comments (1)
💯 I'm running into this non-deterministic behavior as well.
I'm using this via https://golangci-lint.run and have a configuration like
importas:
alias:
- pkg: github.com/go-kit/log
alias: kitlog
- pkg: github.com/foo/bar/scheduler/(v[\w\d]+)
alias: sched$1
- pkg: github.com/foo/bar.*/(\w+)/(v[\w\d]+)
alias: $1$2
unfortunately I randomly see errors like
grpcclient/clients_scheduler.go:8:2: import "github.com/foo/bar/scheduler/v1" imported as "schedv1" but must be "schedulerv1" according to config (importas)
schedv1 "github.com/foo/bar/scheduler/v1"
In these cases, the last rule in the order is taking precedence, when my intention was for the first rule to match and take precedence.
thanks!
from importas.
Related Issues (8)
- feature request: -no-extra-aliases
- checking different aliases for the same package
- Can't use non capturing group in the alias
- Releasing package with tags HOT 1
- Bump golang.org/x/tools to v0.7.0 (as minimum) and make new tag HOT 1
- Using importas within golangci-lint w/ both no-unaliased and no-extra-aliases fails HOT 1
- Restricting CAPS in import aliases
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from importas.