fmt.Sprintf would be more appropriate, like in the original.