Skip to content
This repository was archived by the owner on Feb 2, 2021. It is now read-only.
This repository was archived by the owner on Feb 2, 2021. It is now read-only.

【重要】part 1 根据代码库操作报错 #260

Description

@lipeigang

调用
micro --registry=etcd call mu.micro.book.service.user User.QueryUserByName '{"userName":"micro"}'
返回
error calling mu.micro.book.service.user.User.QueryUserByName: {"id":"go.micro.server","code":500,"detail":"panic recovered: runtime error: invalid memory address or nil pointer dereference","status":"Internal Server Error"}

检查发现
在 basic/db/mysql.go 中,需要把初始化的 mysqlDB 返回。
并在调用方 basic/db/db.go 第 32 行,改为 mysqlDB = initMysql()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions