MCPcopy
hub / github.com/go-yaml/yaml / newParser

Function newParser

decode.go:41–51  ·  view source on GitHub ↗
(b []byte)

Source from the content-addressed store, hash-verified

39}
40
41func newParser(b []byte) *parser {
42 p := parser{}
43 if !yaml_parser_initialize(&p.parser) {
44 panic("failed to initialize YAML emitter")
45 }
46 if len(b) == 0 {
47 b = []byte{'\n'}
48 }
49 yaml_parser_set_input_string(&p.parser, b)
50 return &p
51}
52
53func newParserFromReader(r io.Reader) *parser {
54 p := parser{}

Callers 2

unmarshalFunction · 0.85
EncodeMethod · 0.85

Calls 2

yaml_parser_initializeFunction · 0.85

Tested by

no test coverage detected