cso

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Write

func Write(w io.Writer, node Node) error

Write writes node to writer

func WriteFile

func WriteFile(filename string, node Node, perm os.FileMode) error

WriteFile writes node to file

Types

type Node

type Node interface {
	// embed encoding.Node
	encoding.Node
	// NumChild returns number of children
	NumChild() int
	// ByIndex gets ith child node,panic if i out of range [0,NumChild)
	ByIndex(i int) Node
	// Value returns value of node as an interface
	Value() interface{}
	// contains filtered or unexported methods
}

func Read

func Read(r io.Reader) (Node, error)

Read reads one node

func ReadAll

func ReadAll(r io.Reader) ([]Node, error)

ReadAll reads all nodes

func ReadBytes

func ReadBytes(data []byte) ([]Node, error)

ReadBytes reads nodes from bytes

func ReadFile

func ReadFile(filename string) ([]Node, error)

ReadFile reads nodes from file

Jump to

Keyboard shortcuts

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