Skip to content

int转string #7

@OpenCreate

Description

@OpenCreate

context.SetCookie("user_cookie", string(u.Id), 1000, "/", "localhost", false, true)

这里如果是将整数直接转为字符串显示,应该考虑使用 strconv.FormatInt((int64(u.Id))
string(u.Id) 将生成一个rune 值为 u.Id 值的字符串。

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