code: func UpdateEventFields(event Event, fields EventFields, clock clockwork.Clock, uid utils.UID) (err error) {
  	additionalFields := make(map[string]interface{})
  	if fields.GetType() == "" {
  		additionalFields[EventType] = event.Name
  	}
  	if fields.GetID() == "" {
  		additionalFields[EventID] = uid.New()
  	}
  	if fields.GetTimestamp().IsZero() {
  		additionalFields[EventTime] = clock.Now().UTC().Round(time.Second)
  	}
  	if event.Code != "" {
  		additionalFields[EventCode] = event.Code
  	}
  	for k, v := range additionalFields {
  		fields[k] = v
  	}
  	return nil
  }
docs: // UpdateEventFields updates passed event fields with additional information
  // common for all event types such as unique IDs, timestamps, codes, etc.
  //
  // This method is a "final stop" for various audit log implementations for
  // updating event fields before it gets persisted in the backend.