1 // Automatically generated by internal/cmd/genreadfile/main.go. DO NOT EDIT 2 3 package jwe 4 5 import "os" 6 7 // ReadFileOption describes options that can be passed to ReadFile. 8 // Currently there are no options available that can be passed to ReadFile, but 9 // it is provided here for anticipated future additions 10 type ReadFileOption interface { 11 Option 12 readFileOption() 13 } 14 15 func ReadFile(path string, _ ...ReadFileOption) (*Message, error) { 16 f, err := os.Open(path) 17 if err != nil { 18 return nil, err 19 } 20 21 defer f.Close() 22 return ParseReader(f) 23 } 24