code: func loadProtoDescription(dir string, importPaths []string) (*descriptor.FileDescriptorSet, error) {
  	dir, err := filepath.Abs(dir)
  	if err != nil {
  		return nil, errors.Annotate(err, "could make path %q absolute", dir).Err()
  	}
  
  	tempDir, err := ioutil.TempDir("", "")
  	if err != nil {
  		return nil, err
  	}
  	defer os.RemoveAll(tempDir)
  	descFile := filepath.Join(tempDir, "desc")
  
  	importPaths, err = protoImportPaths(dir, importPaths)
  	if err != nil {
  		return nil, err
  	}
  
  	args := []string{
  		"--descriptor_set_out=" + descFile,
  		"--include_imports",
  		"--include_source_info",
  	}
  	for _, p := range importPaths {
  		args = append(args, "-I="+p)
  	}
  	protoFiles, err := filepath.Glob(filepath.Join(dir, "*.proto"))
  	if err != nil {
  		return nil, err
  	}
  	if len(protoFiles) == 0 {
  		return nil, fmt.Errorf("no .proto files found in directory %q", dir)
  	}
  	args = append(args, protoFiles...)
  
  	protoc := exec.Command("protoc", args...)
  	protoc.Stderr = os.Stderr
  	if err := protoc.Run(); err != nil {
  		return nil, errors.Annotate(err, "protoc run failed").Err()
  	}
  
  	descBytes, err := ioutil.ReadFile(descFile)
  	if err != nil {
  		return nil, err
  	}
  	var desc descriptor.FileDescriptorSet
  	err = proto.Unmarshal(descBytes, &desc)
  	return &desc, err
  }
docs: // loadProtoDescription compiles .proto files in the dir
  // and returns their descriptor.