Skip to content

Kratos 命令行工具创建的模板与自身版本不匹配 #3868

Description

@jaspertian

What happened:

使用 v2.9.2 版本的 kratos 命令行工具创建项目(kratos new)时,得到的项目模板是 kratos v3 版本的。

What you expected to happen:

kratos 版本应与使用的模板版本相匹配。

How to reproduce it (as minimally and precisely as possible):

  1. 下载kratos: go install github.com/go-kratos/kratos/cmd/kratos/v2@latest
  2. 创建项目, 选择 service :kratos new user
  3. 检查 main.go , 发现 import 的是 kratos v3

Anything else we need to know?:

Image

Environment:

  • Kratos version (use kratos -v): v2.9.2
  • Go version (use go version): 1.26.5
  • OS (e.g: cat /etc/os-release): windows 10
  • Others:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions