Gopher at GitHub working on Copilot. Author of Mage. Dungeon Master and Magic player. Used to be NateTheFinch on the Bird Site that shall not be named.
Nate Finch
Loading...
Another new release for Mage -https://github.com/magefile/mage/releases/tag/v1.17.0
Adds support for retaining line returns in help text output. Minor, but a papercut that now is fixed.
Also updated the whole codebase to remove old crufty code, added tests, and a modern lint configuration.
Say you have
func Speak(msg string, upper *bool, repeat *count)
Mage can now call this as
mage speak -upper "this is all uppercase"
or
mage speak -repeat=2 "say this twice"
and of course, this still works
mage speak "this comes out as-is"
(obv depending on the implementation of speak)
Big update for Mage. I shipped optional arguments (flags)! Something long desired but difficult to get off the ground. Opus 4.6 took my description and nailed it in one shot.
I just had to tell it to update the website with docs. Shipped in v1.16.0
magefile.org/targets/
Example below
In the 500k-ish lines of go code for my project at work, we have 4 fallthrough statements.
One was used incorrectly.
Two fell through to default and probably should have the default logic moved outside the switch.
Just one was arguably necessary.
#golang pro-tip:
Fallthrough literally falls through to the *next* case statement, no matter what the next `case xxxx` statement checks.
Fallthrough does not continue checking case statements and it doesn't jump to the `default:` statement.