code: func FindEnum(d *pb.DescriptorProto, name string) int {
  	for i, x := range d.GetEnumType() {
  		if x.GetName() == name {
  			return i
  		}
  	}
  	return -1
  }
docs: // FindEnum searches for a nested EnumDescriptorProto by name.