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

Function yaml_emitter_analyze_version_directive

emitterc.go:1183–1188  ·  view source on GitHub ↗

Check if a %YAML directive is valid.

(emitter *yaml_emitter_t, version_directive *yaml_version_directive_t)

Source from the content-addressed store, hash-verified

1181
1182// Check if a %YAML directive is valid.
1183func yaml_emitter_analyze_version_directive(emitter *yaml_emitter_t, version_directive *yaml_version_directive_t) bool {
1184 if version_directive.major != 1 || version_directive.minor != 1 {
1185 return yaml_emitter_set_emitter_error(emitter, "incompatible %YAML directive")
1186 }
1187 return true
1188}
1189
1190// Check if a %TAG directive is valid.
1191func yaml_emitter_analyze_tag_directive(emitter *yaml_emitter_t, tag_directive *yaml_tag_directive_t) bool {

Callers 1

Calls 1

Tested by

no test coverage detected