code: func (e *Encoder) Encode(event *watch.Event) error {
  	obj, err := Object(e.codec, event)
  	if err != nil {
  		return err
  	}
  	return e.encoder.Encode(obj)
  }
docs: // Encode writes an event to the writer. Returns an error
  // if the writer is closed or an object can't be encoded.