Skip to content

golang.org/x/mod模块的版本太旧,导致不支持带小版本号的go version(如1.22.1) #395

Open
@tonyzz6

Description

@tonyzz6

问题:
编译过程中出现报错 fail to generate new go.mod: /tmp/****/go.mod:3: invalid go version '1.22.1': must match format 1.23"

原因:
项目下的golang.org/x/mod模块版本太旧,需要更新至0.13+?
image
https://cs.opensource.google/go/x/mod/+/refs/tags/v0.12.0:modfile/rule.go;l=246
image
https://cs.opensource.google/go/x/mod/+/refs/tags/v0.13.0:modfile/rule.go;l=246
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions