// ReadFile returns the contents of `filename`. func ReadFile(filename string) (string, error) { a := afero.Afero{ Fs: AppFs, } fileBytes, err := a.ReadFile(filename) if err != nil { return "", err } return string(fileBytes), nil }
func fileContents(file string) (string, error) { a := afero.Afero{ Fs: appFs, } contents, err := a.ReadFile(file) if err != nil { return "", err } return string(contents), nil }