File: option.go

package info (click to toggle)
golang-github-goccy-go-yaml 1.18.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,968 kB
  • sloc: javascript: 505; makefile: 57
file content (12 lines) | stat: -rw-r--r-- 307 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
package parser

// Option represents parser's option.
type Option func(p *parser)

// AllowDuplicateMapKey allow the use of keys with the same name in the same map,
// but by default, this is not permitted.
func AllowDuplicateMapKey() Option {
	return func(p *parser) {
		p.allowDuplicateMapKey = true
	}
}