DEV Community

Discussion on: Unit testing Stdout in Go

Collapse
mstgnz profile image
Mesut GENEZ

So how do we capture print inside a void function that has no "writer" parameter?

func SayHello(name string) {
fmt.Print("Hi, my name is", name)
}