loaders

package
v0.0.0-...-586e974 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2019 License: BSD-2-Clause Imports: 9 Imported by: 0

Documentation

Overview

Loaders package is reponsible for loading plist and json files

We have a specific peg file for each(e.g plist/plist.peg) which based on them we generate for example plist/plist_generated.go. The generator is a pegparser written by @quarnster which can be found here: github.com/jxo/parser/pegparser. About the plist loading note that first we are converting it to json and then we pass it to LoadJSON function, after some parsing there it is passed to golangs "encoding/json" package for unmarshaling.

If you want to change the peg rules in peg file, you should at least pass two tests. First add sth related to the new rule in testdata/*.plist files if the generated tests got pass it means probably there isn't any problem in reading, in second step the plist_test.go should pass which is related to parsing stuff. Also you may want to check plistconv() function for the special things we do on some nodes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadJSON

func LoadJSON(data []byte, intf interface{}) error

func LoadPlist

func LoadPlist(data []byte, intf interface{}) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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