toml

package
v0.0.0-...-6b33518 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2019 License: AGPL-3.0-or-later, BSD-3-Clause Imports: 8 Imported by: 8

Documentation

Overview

Package toml implements Tom's Obvious Minimal Language.

This package implements a subset of the TOML specification that's useful for Alpenhorn config files. We built our own TOML package so that we could have control over how certain types are encoded. For example, []byte can be encoded as a base32 string.

This package does not yet provide an encoder since most configs in Alpenhorn can be generated using a template.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeBytes

func DecodeBytes(str string) ([]byte, error)

func EncodeBytes

func EncodeBytes(data []byte) string

func Unmarshal

func Unmarshal(data []byte, v interface{}) error

Unmarshal parses the TOML-encoded data and stores the result in the value pointed to by v. Unmarshal has special cases for the following types:

[]byte can be encoded as a base32 string
time.Duration can be encoded as a string in the form "72h3m0.5s"

Types

This section is empty.

Jump to

Keyboard shortcuts

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