Dear all I'm a 3rd cli tool developer, and most of my users install the cli tool via *go install github.com/example/mycli*. I got trouble for attaching the revision by default so users could run *mycli version *to get a revision(tag or git commit).
The known workarounds cannot solve my problem: 1. put the tag inside the codebase: doesn't work for commit because i cannot know the concrete commit before committing 2. pass it by ldflag: doesn't work because i cannot ask users to attach the version, that's quite dummy The ideal way is that during *go install *the go compiler could help attach this information, but i haven't found this related docs. Could anyone provide some ideas about it? If the ideal way is not possible, is it possible to get the revision after users install my cli tool via go install? xieyuschen Regards -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/3b71f6d3-6efc-4738-b510-c0f3fd1ed68an%40googlegroups.com.