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

Method nsname

opensca/sca/java/xml/xml.go:1160–1174  ·  view source on GitHub ↗

Get name space name: name with a : stuck in the middle. The part before the : is the name space identifier.

()

Source from the content-addressed store, hash-verified

1158// Get name space name: name with a : stuck in the middle.
1159// The part before the : is the name space identifier.
1160func (d *Decoder) nsname() (name Name, ok bool) {
1161 s, ok := d.name()
1162 if !ok {
1163 return
1164 }
1165 if strings.Count(s, ":") > 1 {
1166 return name, false
1167 } else if space, local, ok := strings.Cut(s, ":"); !ok || space == "" || local == "" {
1168 name.Local = s
1169 } else {
1170 name.Space = space
1171 name.Local = local
1172 }
1173 return name, true
1174}
1175
1176// Get name: /first(first|second)*/
1177// Do not set d.err if the name is missing (unless unexpected EOF is received):

Callers 1

rawTokenMethod · 0.95

Calls 1

nameMethod · 0.95

Tested by

no test coverage detected