config

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2018 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package config contains utilities for reading and parsing service configuration files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read

func Read(path string, replaceEnvs bool, config interface{}) error

Read will attempt to read a configuration file path into a structure.

Types

type SanitForYAML

type SanitForYAML map[string]interface{}

SanitForYAML a map to be embedded within a parent object for YAML marshalling.

type Sanitised

type Sanitised map[string]interface{}

Sanitised is a general map[string]interface{} type that tries to marshal into both YAML and JSON in a way that ensure the 'type' field is always first.

func (Sanitised) MarshalJSON

func (s Sanitised) MarshalJSON() ([]byte, error)

MarshalJSON return the config as a JSON blob with the 'type' field first.

func (Sanitised) MarshalYAML

func (s Sanitised) MarshalYAML() (interface{}, error)

MarshalYAML return the config as YAML with the 'type' field first.

Jump to

Keyboard shortcuts

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