50fbc2eec2
* CI: use staticcheck for linting This commit switches the linter for Go code from golint to staticcheck. Golint has been deprecated since last year and staticcheck is a recommended replacement. Signed-off-by: Lucas Servén Marín <lserven@gmail.com> * revendor Signed-off-by: Lucas Servén Marín <lserven@gmail.com> * cmd,pkg: fix lint warnings Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
34 lines
862 B
Go
34 lines
862 B
Go
// Copyright 2009 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package fakexml
|
|
|
|
// References:
|
|
// Annotated XML spec: https://www.xml.com/axml/testaxml.htm
|
|
// XML name spaces: https://www.w3.org/TR/REC-xml-names/
|
|
|
|
// TODO(rsc):
|
|
// Test error handling.
|
|
|
|
// A Name represents an XML name (Local) annotated
|
|
// with a name space identifier (Space).
|
|
// In tokens returned by Decoder.Token, the Space identifier
|
|
// is given as a canonical URL, not the short prefix used
|
|
// in the document being parsed.
|
|
type Name struct {
|
|
Space, Local string
|
|
}
|
|
|
|
// An Attr represents an attribute in an XML element (Name=Value).
|
|
type Attr struct {
|
|
Name Name
|
|
Value string
|
|
}
|
|
|
|
// A StartElement represents an XML start element.
|
|
type StartElement struct {
|
|
Name Name
|
|
Attr []Attr
|
|
}
|