4 ms·
Question: who is going to remember all these conversion rules? By the second bullet you lost me. Simply run the command below: go tool fix -diff -force=con
by notforgot 10y ago
Question: who is going to remember all these conversion rules? By the second bullet you lost me.
Simply run the command below:
go tool fix -diff -force=context state-of-go/tools/gofix.go
How is typing 59 characters simple?
- shurcooL 10y ago`staticcheck` will statically analyze your code and suggest all places where the new conversion rule can be applied. All the other rules are same as the last 7 years, you know them through experience after using Go for a week. Way simpler than most other languages. That go fix command can be typed once and update millions of lines of code. Pretty simple.
- notforgot 10y agoThese rules intimidate me (I don't know Go). You also meant to say the go fix command does a lot (which is great), not that calling it is simple (which is not great).
- _arvin 10y agoHow lazy are you?
- JepZ 10y agoI also hate any command that has more than, lets say 3 spaces, for its complexity, but hopefully this conversion stuff is more or less just a one time job so: who cares ;-)
- psankar 10y agoIf you are precise, you will understand that the command is only 32 characters. You should not include the filepath in your length calculation. And 32 characters is not much longer than, say: python manage.py makemigrations