Thanks to visit codestin.com
Credit goes to github.com

Skip to content

QF1012 : b.WriteString(x + y) -> b.WriteString(s); b.WriteString(y) #1684

@adonovan

Description

@adonovan

The checker that replaces b.WriteString(fmt.Sprintf(...)) with Fprintf(&buf, ...) could also optimize calls to WriteString where the operand is a string concatenation. Replacing it with two calls to WriteString would avoid an allocation.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions