code: func (x *Intention) UpdatePrecedence() {
  	// Max maintains the maximum value that the precedence can be depending
  	// on the number of exact values in the destination.
  	var max int
  	switch x.countExact(x.DestinationNS, x.DestinationName) {
  	case 2:
  		max = 9
  	case 1:
  		max = 6
  	case 0:
  		max = 3
  	default:
  		// This shouldn't be possible, just set it to zero
  		x.Precedence = 0
  		return
  	}
  
  	// Given the maximum, the exact value is determined based on the
  	// number of source exact values.
  	countSrc := x.countExact(x.SourceNS, x.SourceName)
  	x.Precedence = max - (2 - countSrc)
  }
docs: // UpdatePrecedence sets the Precedence value based on the fields of this
  // structure.