blob: 4fd2b136b82bc985ef95ea3e38f9c73571633465 [file] [log] [blame]
package fmtappendf
import (
"fmt"
)
func two() string {
return "two"
}
func bye() {
bye := fmt.Appendf(nil, "bye %d", 1) // want "Replace .*Sprintf.* with fmt.Appendf"
print(bye)
}
func funcsandvars() {
one := "one"
bye := fmt.Appendf(nil, "bye %d %s %s", 1, two(), one) // want "Replace .*Sprintf.* with fmt.Appendf"
print(bye)
}
func typealias() {
type b = byte
type bt = []byte
bye := fmt.Appendf(nil, "bye %d", 1) // want "Replace .*Sprintf.* with fmt.Appendf"
print(bye)
bye = fmt.Appendf(nil, "bye %d", 1) // want "Replace .*Sprintf.* with fmt.Appendf"
print(bye)
}
func otherprints() {
sprint := fmt.Append(nil, "bye %d", 1) // want "Replace .*Sprint.* with fmt.Append"
print(sprint)
sprintln := fmt.Appendln(nil, "bye %d", 1) // want "Replace .*Sprintln.* with fmt.Appendln"
print(sprintln)
}