nestedtext

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package nestedtext implements a koanf Parser that parses NestedText bytes as conf maps.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NT

type NT struct{}

NT implements a NestedText parser.

func Parser

func Parser() *NT

Parser returns a NestedText Parser.

func (*NT) Marshal

func (p *NT) Marshal(m map[string]interface{}) ([]byte, error)

Marshal marshals the given config map to NestedText bytes.

func (*NT) Unmarshal

func (p *NT) Unmarshal(b []byte) (map[string]interface{}, error)

Unmarshal parses the given NestedText bytes.

If the NT content does not reflect a dict (NT allows for top-level lists or strings as well), the content will be wrapped into a dict with a single key named "nestedtext".

Jump to

Keyboard shortcuts

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