Skip to content

Implementing Scanner.Scan for int64 returns []uint8 (byte) instead of int64 #802

@al3rez

Description

@al3rez

I implemented Scanner for a struct called PrepTime in which embeds time.Duration and type of the related column is bigint (also tested with integer) but the returning src is []uint8 instead of int64 and I must first convert the []uint8 (byte) to string then convert it to int64 using strconv.ParseInt(string(src.([]uint8), 10, 64)

Is this behavior done on purpose?

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