我不小心发布了一个包到go.dev网站,谁能告诉我如何删除它?
最佳答案
已发布的模块无法删除,但可以撤回。撤回的版本仍然存在并且可以下载(因此依赖它的构建不会中断),但是 go 命令在解析时不会自动选择它。更多信息 here .
要收回你必须在你的 go.mod 中添加收回指令。例如
retract v1.0.0
retract [v1.0.0, v1.9.9]
retract (
v1.0.0
[v1.0.0, v1.9.9]
)
请注意:
The retract directive was added in Go 1.16. Go 1.15 and lower will report an error if a retract directive is written in the main module's go.mod file and will ignore retract directives in go.mod files of dependencies.
关于go - 如何删除我不小心发布到 go.dev 的包?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68599703/