MCPcopy Index your code
hub / github.com/maruel/panicparse / merge

Method merge

stack/stack.go:713–730  ·  view source on GitHub ↗

merge merges two similar Signature, zapping out differences.

(r *Signature)

Source from the content-addressed store, hash-verified

711
712// merge merges two similar Signature, zapping out differences.
713func (s *Signature) merge(r *Signature) *Signature {
714 min := s.SleepMin
715 if r.SleepMin < min {
716 min = r.SleepMin
717 }
718 max := s.SleepMax
719 if r.SleepMax > max {
720 max = r.SleepMax
721 }
722 return &Signature{
723 State: s.State, // Drop right side.
724 CreatedBy: s.CreatedBy, // Drop right side.
725 SleepMin: min,
726 SleepMax: max,
727 Stack: *s.Stack.merge(&r.Stack),
728 Locked: s.Locked || r.Locked, // TODO(maruel): This is weirdo.
729 }
730}
731
732// less compares two Signature, where the ones that are less are more
733// important, so they come up front. A Signature with more private functions is

Callers 1

AggregateMethod · 0.95

Calls 1

mergeMethod · 0.45

Tested by

no test coverage detected