func shouldIgnore(inp string, t command.InputType, excl []*command.InputExclusion) bool {
	for _, r := range excl {
		if r.Type != command.UnspecifiedInputType && r.Type != t {
			continue
		}
		if m, _ := regexp.MatchString(r.Regex, inp); m {
			return true
		}
	}
	return false
}
shouldIgnore returns whether a given input should be excluded based on the given InputExclusions,
package client
import (
	"errors"
	"fmt"
	"os"
	"path/filepath"
	"regexp"
	"sort"
	"strings"
	"github.com/bazelbuild/remote-apis-sdks/go/pkg/command"
	"github.com/bazelbuild/remote-apis-sdks/go/pkg/digest"
	"github.com/bazelbuild/remote-apis-sdks/go/pkg/filemetadata"
	"github.com/bazelbuild/remote-apis-sdks/go/pkg/uploadinfo"
	repb "github.com/bazelbuild/remote-apis/build/bazel/remote/execution/v2"
)
type treeNode struct {
	files    map[string]*fileNode
	dirs     map[string]*treeNode
	symlinks map[string]*symlinkNode
}
type fileNode struct {
	ue           *uploadinfo.Entry
	isExecutable bool
}
type symlinkNode struct {
	target string
}
type fileSysNode struct {
	file                 *fileNode
	emptyDirectoryMarker bool
	symlink              *symlinkNode
}
type TreeStats struct {
	InputFiles int
	InputDirectories int
	InputSymlinks int
	TotalInputBytes int64
}
type TreeSymlinkOpts struct {
	Preserved bool
	FollowsTarget bool
}
func DefaultTreeSymlinkOpts() *TreeSymlinkOpts {
	return &TreeSymlinkOpts{
		FollowsTarget: true,
	}
}
func treeSymlinkOpts(opts *TreeSymlinkOpts, sb command.SymlinkBehaviorType) *TreeSymlinkOpts {
	if opts == nil {
		opts = DefaultTreeSymlinkOpts()
	}
	switch sb {
	case command.ResolveSymlink:
		opts.Preserved = false
	case command.PreserveSymlink:
		opts.Preserved = true
	}
	return opts
}