MCPcopy Create free account
hub / github.com/OpenListTeam/OpenList / name

Method name

server/webdav/internal/xml/xml.go:1157–1170  ·  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

1155// Do not set d.err if the name is missing (unless unexpected EOF is received):
1156// let the caller provide better context.
1157func (d *Decoder) name() (s string, ok bool) {
1158 d.buf.Reset()
1159 if !d.readName() {
1160 return "", false
1161 }
1162
1163 // Now we check the characters.
1164 b := d.buf.Bytes()
1165 if !isName(b) {
1166 d.err = d.syntaxError("invalid XML name: " + string(b))
1167 return "", false
1168 }
1169 return string(b), true
1170}
1171
1172// Read a name and append its bytes to d.buf.
1173// The name is delimited by any single-byte character not valid in names.

Callers 2

rawTokenMethod · 0.95
nsnameMethod · 0.95

Calls 4

readNameMethod · 0.95
syntaxErrorMethod · 0.95
isNameFunction · 0.85
ResetMethod · 0.45

Tested by

no test coverage detected