gomacro icon indicating copy to clipboard operation
gomacro copied to clipboard

Add gomacro subcommands: update and run

Open Keithcat1 opened this issue 6 years ago • 1 comments

Update/import without any arguments regenerates all the import files for all packages that Gomacro knows about, including the standard library, with the option "Import.Uses.Module" unset. Example: gomacro update With arguments, generates files for all packages listed as arguments. Example: gomacro update github.com/faiface/beep unsafe strings Reason: With new releases Go packages sometimes get new functions, and Gomacro doesn't know about them, so they can't be used without reimporting and recompiling. Also, this would make testing packages that you're working on much simpler, since after every update you could just run a little script to fix the import file and rebuild Gomacro.

Go run executes the specified Go file, loading it and calling main(). Of course this is already possible, but it may decrease confusion for new users and give them a more convensional way to do it.

Keithcat1 avatar Dec 28 '19 20:12 Keithcat1

That's definitely useful, thanks for the idea :)

cosmos72 avatar Feb 17 '20 10:02 cosmos72