How do I get the string value of os.Error? ie. assign to a variable.
For example,
package main import ( "errors" "fmt" ) func main() { err := errors.New("an error message") s := err.Error() fmt.Printf("type: %T; value: %q\n", s, s) }
Output:
type: string; value: "an error message"