func (e *entry) complete(ent *Entry) bool {
	// Do nothing if the entry is already complete
	if e.content != nil {
		return false
	}

	// Cancel any pending request
	if e.cancel != nil {
		e.cancel()
		e.cancel = nil
	}

	// Save the content
	e.content = ent

	// Pass it on to all pending requests and close the channels
	if e.reqs != nil {
		for _, req := range e.reqs {
			req <- *ent
			close(req)
		}

		// Clear the map of requests
		e.reqs = nil
	}

	// Check if the entry needs to be removed
	return ent.Error != nil && !IsPermanent(ent.Error)
}
// complete updates the entry with the proper contents.  It returns a
// boolean true value if the index entry should be removed, e.g., if
// the error is non-nil and is not a permanent error.  This call will
// cancel any pending operations.
complete updates the entry with the proper contents.  It returns a
boolean true value if the index entry should be removed, e.g., if
the error is non-nil and is not a permanent error.  This call will
cancel any pending operations.
// complete updates the entry with the proper contents . It returns a // boolean true value if the index entry should be removed e . g . if // the error is non - nil and is not a permanent error . This call will // cancel any pending operations .
func (e *entry) complete(ent *Entry) bool {
	if e.content != nil {
		return false
	}
	if e.cancel != nil {
		e.cancel()
		e.cancel = nil
	}
	e.content = ent
	if e.reqs != nil {
		for _, req := range e.reqs {
			req <- *ent
			close(req)
		}
		e.reqs = nil
	}
	return ent.Error != nil && !IsPermanent(ent.Error)
}
func ( e * entry ) complete ( ent * Entry ) bool { if e . content != nil { return false } if e . cancel != nil { e . cancel ( ) e . cancel = nil } e . content = ent if e . reqs != nil { for _ , req := range e . reqs { req <- * ent close ( req ) } e . reqs = nil } return ent . Error != nil && ! IsPermanent ( ent . Error ) }
complete updates the entry with the proper contents.
complete updates the entry with the proper contents .
// Do nothing if the entry is already complete // Cancel any pending request // Save the content // Pass it on to all pending requests and close the channels // Clear the map of requests // Check if the entry needs to be removed