Home > Article > Backend Development > Github releases golang submodule
php editor Xiaoxin discovered in the latest technology trends that Github recently released an important update: golang submodule. This update brings a more convenient development environment and more efficient code management to developers using the golang language. Through golang submodules, developers can more easily integrate and manage other golang libraries in their projects, and can also collaborate with other developers more conveniently. This update will undoubtedly further promote the application and development of golang in the development field.
When you publish a repository on github you can use "tags" which make it easier to track in go.mod
But the existing github publishing method for submodules (or multiple modules) does not work.
The "main" module will be marked
But "submodule" cannot be referenced through this tag. (This makes sense since they shouldn't be required to be in lockstep)
My question is how do I get Github to tag this submodule with an explicit version?
Please note that this is a "private" repository, so I cannot publish it as a separate package in golang outside of github
You can do this by adding Prefix the directory prefix to mark the version of each submodule.
So for the following directory structure, this tag can be created submod/subsubmod/v0.0.1
demo/ └── submod └── subsubmod ├── file.go └── go.mod
The above is the detailed content of Github releases golang submodule. For more information, please follow other related articles on the PHP Chinese website!