MCPcopy
hub / github.com/mmcdole/gofeed / parseVersion

Method parseVersion

atom/parser.go:719–735  ·  view source on GitHub ↗
(p *xpp.XMLPullParser)

Source from the content-addressed store, hash-verified

717}
718
719func (ap *Parser) parseVersion(p *xpp.XMLPullParser) string {
720 ver := p.Attribute("version")
721 if ver != "" {
722 return ver
723 }
724
725 ns := p.Attribute("xmlns")
726 if ns == "http://purl.org/atom/ns#" {
727 return "0.3"
728 }
729
730 if ns == "http://www.w3.org/2005/Atom" {
731 return "1.0"
732 }
733
734 return ""
735}
736
737func (ap *Parser) stripWrappingDiv(content string) (result string) {
738 result = content

Callers 1

parseRootMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected