func IsSubPath(subject, path string) (bool, error) {
	pathAbs, err := filepath.Abs(path)
	if err != nil {
		return false, fmt.Errorf("failed to make %s absolute: %w", path, err)
	}
	subjectAbs, err := filepath.Abs(subject)
	if err != nil {
		return false, fmt.Errorf("failed to make %s absolute: %w", subject, err)
	}
	if !strings.HasPrefix(subjectAbs, pathAbs) {
		return false, nil
	}
	return true, nil
}
IsSubPath checks (lexically) if subject is a subpath of path.
package util
import (
	"fmt"
	"os"
	"path/filepath"
	"strings"
)
func FileExists(path string) bool {
	_, err := os.Stat(path)
	return !os.IsNotExist(err)
}