5 ms·
Here's a nice blog post with more information about that https://blog.carlana.net/post/2023/golang-git-hash-how-to/ https://blog.carlana.net/post/2023/golang-gi
by fanf2 3y ago
Here's a nice blog post with more information about that https://blog.carlana.net/post/2023/golang-git-hash-how-to/ https://blog.carlana.net/post/2023/golang-git-hash-how-to/
- peter_l_downs 3y agoI'm currently using the ldflags approach [0], but the linked library [1] looks much nicer. I'll probably switch over to it soon. Thanks! [0]: https://github.com/peterldowns/localias/blob/main/Justfile#L32 https://github.com/peterldowns/localias/blob/main/Justfile#L... [1]: https://github.com/earthboundkid/versioninfo https://github.com/earthboundkid/versioninfo