Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gomacro subcommands: update and run #80

Open
Keithcat1 opened this issue Dec 28, 2019 · 1 comment
Open

Add gomacro subcommands: update and run #80

Keithcat1 opened this issue Dec 28, 2019 · 1 comment

Comments

@Keithcat1
Copy link

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.

@cosmos72
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants