MCPcopy Index your code
hub / github.com/XmirrorSecurity/OpenSCA-cli / name

Method name

opensca/sca/java/xml/xml.go:1179–1192  ·  view source on GitHub ↗

Get name: /first(first|second)*/ Do not set d.err if the name is missing (unless unexpected EOF is received): let the caller provide better context.

()

Source from the content-addressed store, hash-verified

1177// Do not set d.err if the name is missing (unless unexpected EOF is received):
1178// let the caller provide better context.
1179func (d *Decoder) name() (s string, ok bool) {
1180 d.buf.Reset()
1181 if !d.readName() {
1182 return "", false
1183 }
1184
1185 // Now we check the characters.
1186 b := d.buf.Bytes()
1187 if !isName(b) {
1188 d.err = d.syntaxError("invalid XML name: " + string(b))
1189 return "", false
1190 }
1191 return string(b), true
1192}
1193
1194// Read a name and append its bytes to d.buf.
1195// The name is delimited by any single-byte character not valid in names.

Callers 2

rawTokenMethod · 0.95
nsnameMethod · 0.95

Calls 3

readNameMethod · 0.95
syntaxErrorMethod · 0.95
isNameFunction · 0.85

Tested by

no test coverage detected