saver

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffer

type Buffer struct {
	// contains filtered or unexported fields
}

func NewBuffer

func NewBuffer() *Buffer

func (*Buffer) Bytes

func (b *Buffer) Bytes() []byte

func (*Buffer) CloseTag

func (b *Buffer) CloseTag(tag string)

func (*Buffer) CloseTagWithIndent

func (b *Buffer) CloseTagWithIndent(tag string)

func (*Buffer) DecreaseDepth

func (b *Buffer) DecreaseDepth()

func (*Buffer) GetDepth

func (b *Buffer) GetDepth() int

func (*Buffer) GetLastLine

func (b *Buffer) GetLastLine() []byte

func (*Buffer) IncreaseDepth

func (b *Buffer) IncreaseDepth()

func (*Buffer) Len

func (b *Buffer) Len() int

func (*Buffer) OpenTag

func (b *Buffer) OpenTag(tag string, attr attributes.Attributes)

func (*Buffer) RemoveEmptyLine

func (b *Buffer) RemoveEmptyLine()

func (*Buffer) RevertToLatestPoint

func (b *Buffer) RevertToLatestPoint()

func (*Buffer) ToFile

func (b *Buffer) ToFile(path string) error

func (*Buffer) Write

func (b *Buffer) Write(p []byte) (int, error)

func (*Buffer) WriteEmptyTag

func (b *Buffer) WriteEmptyTag(tag string, attr attributes.Attributes)

func (*Buffer) WriteString

func (b *Buffer) WriteString(s string)

func (*Buffer) WriteStringWithIndent

func (b *Buffer) WriteStringWithIndent(s string)

func (*Buffer) WriteWithIndent

func (b *Buffer) WriteWithIndent(p []byte)

type Flag

type Flag uint

type Transformer

type Transformer interface {
	// TransformToXML transforms the type to XML. It returns ErrEmptyValue when the
	// type is empty and can't be transformed to XML. The tag must be open BEFORE calling this method.
	TransformToXML(buffer *Buffer) error
	// GetXMLTag give the XML tag. It returns nil when the type can't define a unique
	// XML tag.
	GetXMLTag() []byte
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL