package common_test import ( "fmt" "git.makaay.nl/mauricem/go-parsekit/common" ) func ExampleError() { err := &common.Error{ Message: "it broke down", Cursor: common.Cursor{Line: 9, Column: 41}, } fmt.Println(err.Error()) fmt.Printf("%s\n", err) // Output: // it broke down at line 10, column 42 // it broke down at line 10, column 42 }