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

_scripts: replace *.sh files with *.go equivalents #22

Open
ghost opened this issue Apr 18, 2018 · 3 comments
Open

_scripts: replace *.sh files with *.go equivalents #22

ghost opened this issue Apr 18, 2018 · 3 comments

Comments

@ghost
Copy link

ghost commented Apr 18, 2018

any chance you can convert the scripts to mage.go
https://magefile.org/

makes running on all desktops ( ie windoze) way way easier.

Great helper script :)
github.com/zvelo/zmage

here is a good example using it
https://github.com/zvelo/cobratest

--

I use mage and vgo for everything and it really helped making cross platform stuff much cleaner and easier.

@myitcv
Copy link
Owner

myitcv commented Apr 18, 2018

I think I'll just replace _scripts/*.sh with plain .go files; because I have a load of helpers I'll then use via myitcv.io/cmd/pkgconcat. But thanks for raising the issue; it's on my TODO list.

@myitcv myitcv changed the title mage.go _scripts: replace *.sh files with *.go equivalents Apr 18, 2018
@ghost
Copy link
Author

ghost commented Apr 18, 2018

that will do the trick.

pkgconcat is a funny beast. i se what is does but am curious how it came to be... ?

@myitcv
Copy link
Owner

myitcv commented Apr 18, 2018

Inspired by "A little copying is better than a little dependency." - https://www.youtube.com/watch?v=PAAkCSZUG1c&t=9m28s

It allows me to "template" programs without creating dependencies. And in some cases it is more natural to "copy" a package than use it as an import (e.g. https://godoc.org/github.com/codeskyblue/go-sh)

Unfortunately I found out after writing it (despite having Googled) that there is prior art:

https://godoc.org/golang.org/x/tools/cmd/bundle

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

No branches or pull requests

1 participant