Skip to content

使用错误码创建的error,打印不出错误信息 #3

@xuefengyuan

Description

@xuefengyuan

func (u *userRepo)Info(ctx context.Context) error { return errors.WithCode(code.ErrDatabase, "data 层 user info 操作失败%s","test") }

fmt.Println(fmt.Sprintf("== == %s", err))
输出的日志是空的

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