code: func FindMessageForFile(f *pb.FileDescriptorProto, name string) int {
  	for i, x := range f.GetMessageType() {
  		if x.GetName() == name {
  			return i
  		}
  	}
  	return -1
  }
docs: // FindMessageForFile searches for a DescriptorProto by name.