goyaml2

package module
v0.0.0-...-ee75331 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2019 License: Apache-2.0 Imports: 8 Imported by: 1

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}$")
)

Functions

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