1// Automatically generated by internal/cmd/genreadfile/main.go. DO NOT EDIT 2 3package jwt 4 5import "os" 6 7// ReadFileOption describes options that can be passed to ReadFile. 8type ReadFileOption interface { 9 Option 10 readFileOption() 11} 12 13func ReadFile(path string, options ...ReadFileOption) (Token, error) { 14 var parseOptions []ParseOption 15 for _, option := range options { 16 switch option := option.(type) { 17 case ParseOption: 18 parseOptions = append(parseOptions, option) 19 } 20 } 21 22 f, err := os.Open(path) 23 if err != nil { 24 return nil, err 25 } 26 27 defer f.Close() 28 return ParseReader(f, parseOptions...) 29} 30