input

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FileTypeJSON represents JSON files
	FileTypeJSON = "JSON"

	// FileTypeYAML represents YAML files
	FileTypeYAML = "YAML"

	//FileTypeUnknown represents we don't now (yet)
	FileTypeUnknown = ""
)

Variables

This section is empty.

Functions

func Load

func Load(fileType FileType, data []byte) (interface{}, error)

Load loads/unmarshals the bytes into the correct map according to the filetype. If no filltype is set it tries to sniff the actual content.

Types

type FileType

type FileType string

FileType is an enum/constant helper type

func DetectFileType

func DetectFileType(path string) FileType

DetectFileType tries to detect the corresponding filetype for a file extension

Jump to

Keyboard shortcuts

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