tvdburgt / go-argon2

Go bindings for Argon2
MIT License
135 stars 13 forks source link

Bundling argon2 source as a git submodule. #12

Open luckcolors opened 5 years ago

luckcolors commented 5 years ago

It would be cool to be able to directly be able to go get this package, this can be achieved to a degree by adding the argon2 source tree as a git submodule of this repo and then changing the argon2 build paths to reference the local submodule folder. This works because golangs automatically downloads gitsubmodules at go get time. This is what i did: https://github.com/luckcolors/go-argon2/commit/8821398cb4ff1a83dcf953d5e9d44f50b0aa77ac (this was done on older version of this repo, might need to be adjusted a little bit)

The only catch would be that whenever https://github.com/P-H-C/phc-winner-argon2 updates the source the submodule refernce would need to be updated too, this is easy enough to do as it requires only one git command, see: https://stackoverflow.com/questions/5828324/update-git-submodule-to-latest-commit-on-origin.

luckcolors commented 5 years ago

This could potentially also solve #11 as then the argon2 source would be always guaranteed to be in the same place.