Github releases golang submodule

WBOY
Release: 2024-02-11 12:00:10
forward
612 people have browsed it

Github 发布 golang 子模块

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.

Issue content

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

Workaround

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
Copy after login

The above is the detailed content of Github releases golang submodule. For more information, please follow other related articles on the PHP Chinese website!

source:stackoverflow.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template