-3

How do we add application version in go modules(NOT Dependency version)?I would like to hear from other people on this.I am not sure how to do this

Sanchu Varkey
  • 49
  • 1
  • 5
  • 1
    You can’t specify the application version in the go module. You set a tag in the repository. That is all you can do. Go will determine the application version by fetching the latest tag. But there is no direct use for that. – chmike Jan 09 '20 at 07:41

1 Answers1

1

Please follow this guide from the official golang blog for more details.

Let's say you're happy with the API of your module and you want to release v1 as the first stable version. To do this you need to commit latest changes and tag them:

$ git add .
$ git commit -m "feat: changes for v1.0.0"
$ git tag -a v1.0.0 -m 'some release message v1.0.0'
$ git push origin v1.0.0