func LoadDescriptorSet(pathSegments ...string) (*descriptor.FileDescriptorSet, error) {
	f, err := ioutil.ReadFile(filepath.Join(pathSegments...))
	if err != nil {
		return nil, err
	}
	set := new(descriptor.FileDescriptorSet)
	if err = proto.Unmarshal(f, set); err != nil {
		return nil, err
	}
	return set, nil
}
LoadDescriptorSet loads a `FileDescriptorSet` from a file on disk. Such a file can be generated using the
`--descriptor_set_out` flag with `protoc`.

Example:
protoc --descriptor_set_out=fileset.pb --include_imports --include_source_info ./booking.proto ./todo.proto
package utils
import (
	"github.com/golang/protobuf/proto"
	"github.com/golang/protobuf/protoc-gen-go/descriptor"
	"github.com/golang/protobuf/protoc-gen-go/plugin"
	"errors"
	"io/ioutil"
	"path/filepath"
)
func CreateGenRequest(fds *descriptor.FileDescriptorSet, filesToGen ...string) *plugin_go.CodeGeneratorRequest {
	req := new(plugin_go.CodeGeneratorRequest)
	req.ProtoFile = fds.GetFile()
	for _, f := range req.GetProtoFile() {
		if InStringSlice(filesToGen, f.GetName()) {
			req.FileToGenerate = append(req.FileToGenerate, f.GetName())
		}
	}
	return req
}
func FilesToGenerate(req *plugin_go.CodeGeneratorRequest) []*descriptor.FileDescriptorProto {
	protos := make([]*descriptor.FileDescriptorProto, 0)
OUTERLOOP:
	for _, name := range req.GetFileToGenerate() {
		for _, f := range req.GetProtoFile() {
			if f.GetName() == name {
				protos = append(protos, f)
				continue OUTERLOOP
			}
		}
	}
	return protos
}