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
Generate go file that represent VersionInfo struct #34
Conversation
test coverage increased |
Will this be checked in anytime soon :) or should we work with a fork of this code. |
@msays2000 Oh, you have just forked the project and merged me code. |
yes, I was testing to see if the PR will work to generate the versionInfo.go file. It does but in forked branch I had to change the import paths. I think many will just like a short version format string rather than a full deserialized struct object may be a small method to return the semantic version. const Version = "x.x.x.x" |
btw, I have deleted my fork after testing. |
I need to test this locally - let me see if I can get to it this weekend. Sorry for the delay. |
Thanks for adding in this functionality! I made it optional and changed the name of the parameters to be more descriptive. |
go generate
a.go
file fromversioninfo.json
.This allows the program to get version info from a global variable. For example, when starting the program, it prints the program name, version and copyright from a global variable.
This is also useful in non-Windows platforms too.
Every time when preparing a program release, the developer only need to update
versioninfo.json
.