yaml

package
v0.0.0-...-dbea759 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package yaml provides methods to parse feature.Feature specifications also known as metadata, from YAML documents.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadFeatures

func ReadFeatures(md []byte) ([]feature.Feature, error)

ReadFeatures takes a slice of bytes with a feature specification in YML and returns a slice of features parsed from it or an error. The YML is expected to be an object containing a features property. The value for this should be an object with a property for each feature with its name and either a string value of 'continuous' for continuous features or a list of valid values for discrete features.

func ReadFeaturesFromFile

func ReadFeaturesFromFile(filepath string) ([]feature.Feature, error)

ReadFeaturesFromFile takes a filepath string, reads its contents and uses ReadFeatures to parse it and return a slice of parsed features or an error. If the file indicated by the filepath cannot be opened for reading an error will be returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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