Files
audita/internal/core/io/files.go

15 lines
260 B
Go
Raw Normal View History

2026-05-10 23:27:54 +00:00
package io
import (
"fmt"
"os"
)
func ReadRequiredFile(path string, label string) ([]byte, error) {
contents, err := os.ReadFile(path)
if err != nil {
return nil, fmt.Errorf("failed to read %s file %q: %w", label, path, err)
}
return contents, nil
}