Skip to content

Mismatch between fmt and io packages #6057

@LukeMauldin

Description

@LukeMauldin
In Go 1.1:
Function fmt.Fprint(w io.Writer, a ...interface{}) returns an "int" while
io.WriterTo interface returns an "int64".  Consequently, a program like
http://play.golang.org/p/b2tcACyfpC fails with this compile error:
invalid operation: totalWritten += n (mismatched types int64 and int)

I think that fmt.Fprint should be changed to return an int64 instead of an int.  This
may have to wait until Go 2.0 because I think this would be an API change.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions