Recently I hope to write a unit test for golang. The function is as below.
func (s *containerStats) Display(w io.Writer) error {
fmt.Fprintf(w, "%s %s\n", "hello", "world")
return nil
}
So how can I test the result of "func Display" is "hello world"?