Hacker News new | ask | show | jobs
by notforgot 3422 days 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?
3 comments

`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.

These 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).

If 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

How lazy are you?
I 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 ;-)