title: How to copy os.Stdout output to string variable
body: <p>I have a function like this:</p>
  
  <pre><code>package main
  
  import (
      "fmt"
  )
  
  // PrintSomething prints some thing
  func PrintSomething() {
      fmt.Println("print something")
  }
  
  func main() {
      PrintSomething()
  }
  </code></pre>
  
  <p>How do I wrap PrintSomething to another function call CaptureSomething to save the string "print something" to a variable and return it?</p>