title: Combine multiple error strings
body: <p>I am new to golang, my application needs to return multiple errors in a loop, later requires to be combined and returned as a single error string. I am not able to use the string functions to combine the error messages. What methods can be use to combine these errors into a single error before returning ? </p>
  
  <pre><code>package main
  
  import (
     "fmt"
     "strings"
  )
  
  func Servreturn() (err error) {
  
     err1 = fmt.Errorf("Something else occured")
     err2 = fmt.Errorf("Something else occured again")
  
     // concatenate both the error
  
     return err3
  
  }
  </code></pre>