parsers

package
Version: v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HCLParser

type HCLParser struct{}

func (*HCLParser) Parse

func (hclParser *HCLParser) Parse(content []byte, c map[string]interface{}) error

type JSONParser

type JSONParser struct{}

func (*JSONParser) Parse

func (jsonParser *JSONParser) Parse(content []byte, c map[string]interface{}) error

type Parser

type Parser interface {

	// Parse parses a config using the Parser's algorithm
	Parse(content []byte, c map[string]interface{}) error
}

Parser defines methods a source should implement, to parse a config from array of bytes

func GetParser

func GetParser(format string) Parser

GetParser gets parser by format or nil if it's unknown

func MustGetParser

func MustGetParser(format string) Parser

MustGetParser gets parser by format. It will call panic() if format is unknown

type PropertiesParser

type PropertiesParser struct{}

func (*PropertiesParser) Parse

func (propertiesParser *PropertiesParser) Parse(content []byte, c map[string]interface{}) error

type TOMLParser

type TOMLParser struct{}

func (*TOMLParser) Parse

func (tomlParser *TOMLParser) Parse(content []byte, c map[string]interface{}) error

type YAMLParser

type YAMLParser struct{}

func (*YAMLParser) Parse

func (yamlParser *YAMLParser) Parse(content []byte, c map[string]interface{}) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL