src

Go monorepo.
git clone git://code.dwrz.net/src
Log | Files | Refs

error.go (213B)


      1 package event
      2 
      3 import "time"
      4 
      5 type Error struct {
      6 	error
      7 	t time.Time
      8 }
      9 
     10 func (e *Error) Time() time.Time {
     11 	return e.t
     12 }
     13 
     14 func NewError(err error) *Error {
     15 	return &Error{
     16 		error: err,
     17 		t:     time.Now(),
     18 	}
     19 }