Help us shape the future of Go! Take the 2026 Go Developer Survey

snaps

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Snap

type Snap struct {
	XMLName xml.Name `xml:"Snap"`
	Label   string   `xml:"label,attr"`
	Content []byte   `xml:",innerxml"`
}

Snap represents a single snapshot

type Snaps

type Snaps struct {
	XMLName xml.Name `xml:"Snaps"`
	Snaps   []Snap   `xml:"Snap"`
}

Snaps represents a set of snapshots from a snapshot file

func New

func New(raw []byte) *Snaps

New reads in byte snapshot data

func (*Snaps) Add

func (s *Snaps) Add(snap Snap) error

Add appends a snapshot to the set

func (*Snaps) Find

func (s *Snaps) Find(label string) (Snap, error)

Find searches for a snapshot which matches the given label

func (*Snaps) Serialize

func (s *Snaps) Serialize() []byte

Serialize converts a set of snapshots to byte data

func (*Snaps) Update

func (s *Snaps) Update(snap Snap) error

Update replaces a snapshot which is already present with it's new version

Jump to

Keyboard shortcuts

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