Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type SyntaxError struct {
- msg string // description of error
- // error occurred after reading Offset bytes, from which line and columnnr can be obtained
- Offset int64
- }
- func (e *SyntaxError) String() string { return e.msg }
- if serr, ok := err.(*json.SyntaxError); ok {
- line, col := findLine(f, serr.Offset)
- return fmt.Errorf("%s:%d:%d: %v", f.Name(), line, col, err)
- }
- package net
- type Error interface {
- Timeout() bool // Is the error a timeout?
- Temporary() bool // Is the error temporary?
- }
Add Comment
Please, Sign In to add comment