func Get() (Enforcements, error) {
	var e Enforcements
	files, err := ioutil.ReadDir(enforceDir)
	if err != nil {
		return e, err
	}
	for _, f := range files {
		p := filepath.Join(enforceDir, f.Name())
		kbs, err := enforcements(p)
		if err != nil {
			elog.Error(cablib.EvtErrEnforcement, fmt.Sprintf("Error getting updates from %q:\n%v", p, err))
			continue
		}
		e.Required = append(e.Required, kbs.Required...)
	}
	e.dedupe()
	return e, nil
}
Get attempts to return all known external enforcements.
package enforcement
import (
	"encoding/json"
	"errors"
	"fmt"
	"io/ioutil"
	"os"
	"path/filepath"
	"github.com/google/cabbie/cablib"
	"gopkg.in/fsnotify.v1"
	"golang.org/x/sys/windows/svc/debug"
	"github.com/google/glazier/go/helpers"
)
var (
	elog debug.Log
	errFileType    = errors.New("file is not json")
	errInvalidFile = errors.New("file path is invalid")
	errParsing     = errors.New("could not parse file content")
	enforceDir = filepath.Join(os.Getenv("ProgramData"), `\Cabbie`)
)
type Enforcements struct {
	Required []string `json:"required"`
	Hidden   []string `json:"hidden"`
}
func enforcements(path string) (Enforcements, error) {
	var e Enforcements
	path = filepath.Clean(path)
	if filepath.Ext(path) != ".json" {
		return e, fmt.Errorf("%w: %q", errFileType, path)
	}
	b, err := helpers.PathExists(path)
	if err != nil {
		return e, fmt.Errorf("error determining %q existence: %v", path, err)
	}
	if !b {
		return e, fmt.Errorf("%w: %q", errInvalidFile, path)
	}
	data, err := ioutil.ReadFile(path)
	if err != nil {
		return e, fmt.Errorf("error reading file %q: %v", path, err)
	}
	if err := json.Unmarshal(data, &e); err != nil {
		return e, fmt.Errorf("%w for %q: %v", errParsing, path, err)
	}
	return e, nil
}