goyaml2

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2017 License: MIT Imports: 8 Imported by: 0

README

goyaml2

YAML for Golang

Documentation

Index

Constants

View Source
const (
	DEBUG        = true
	MAP_KEY_ONLY = iota
)
View Source
const (
	N_Map = iota
	N_List
	N_String
)

Variables

View Source
var (
	RE_INT, _   = regexp.Compile("^[0-9,]+$")
	RE_FLOAT, _ = regexp.Compile("^[0-9]+[.][0-9]+$")
	RE_DATE, _  = regexp.Compile("^[0-9]{4}-[0-9]{2}-[0-9]{2}$")
	RE_TIME, _  = regexp.Compile("^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}$")
)
View Source
var AddStack = true

Functions

func New

func New(text string) error

New returns an error that formats as the given text.

func Read

func Read(r io.Reader) (interface{}, error)

func Write

func Write(w io.Writer, v interface{}) error

Types

type ListNode

type ListNode []interface{}

func (*ListNode) Type

func (l *ListNode) Type() int

type MapNode

type MapNode map[string]interface{}

func (*MapNode) Type

func (m *MapNode) Type() int

type Node

type Node interface {
	Type() int
}

type StringNode

type StringNode string

func (*StringNode) Type

func (s *StringNode) Type() int

Jump to

Keyboard shortcuts

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