package fakexml
import "honnef.co/go/tools/staticcheck/fakexml"
Index ¶
- func Marshal(v types.Type) error
- func StructFieldInfo(f fakereflect.StructField) (*fieldInfo, error)
- type Attr
- type CyclicTypeError
- type Encoder
- type Name
- type StartElement
- type TagPathError
- type UnsupportedTypeError
Functions ¶
func Marshal ¶
func StructFieldInfo ¶
func StructFieldInfo(f fakereflect.StructField) (*fieldInfo, error)
StructFieldInfo builds and returns a fieldInfo for f.
Types ¶
type Attr ¶
An Attr represents an attribute in an XML element (Name=Value).
type CyclicTypeError ¶
func (*CyclicTypeError) Error ¶
func (err *CyclicTypeError) Error() string
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
func NewEncoder ¶
func NewEncoder() *Encoder
func (*Encoder) Encode ¶
type Name ¶
type Name struct { Space, Local string }
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 StartElement ¶
A StartElement represents an XML start element.
type TagPathError ¶
type TagPathError struct { Struct fakereflect.TypeAndCanAddr Field1, Tag1 string Field2, Tag2 string }
A TagPathError represents an error in the unmarshaling process caused by the use of field tags with conflicting paths.
func (*TagPathError) Error ¶
func (e *TagPathError) Error() string
type UnsupportedTypeError ¶
UnsupportedTypeError is returned when Marshal encounters a type that cannot be converted into XML.
func (*UnsupportedTypeError) Error ¶
func (e *UnsupportedTypeError) Error() string
Source Files ¶
marshal.go typeinfo.go xml.go
- Version
- v0.6.1 (latest)
- Published
- Mar 5, 2025
- Platform
- windows/amd64
- Imports
- 8 packages
- Last checked
- 4 hours ago –
Tools for package owners.