MCPcopy Index your code
hub / github.com/apache/casbin / parse

Method parse

config/config.go:90–99  ·  view source on GitHub ↗
(fname string)

Source from the content-addressed store, hash-verified

88}
89
90func (c *Config) parse(fname string) (err error) {
91 f, err := os.Open(fname)
92 if err != nil {
93 return err
94 }
95 defer f.Close()
96
97 buf := bufio.NewReader(f)
98 return c.parseBuffer(buf)
99}
100
101func (c *Config) parseBuffer(buf *bufio.Reader) error {
102 var section string

Callers 1

NewConfigFunction · 0.95

Calls 2

parseBufferMethod · 0.95
CloseMethod · 0.65

Tested by

no test coverage detected