rawbytes

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: MIT Imports: 1 Imported by: 86

Documentation

Overview

Package rawbytes implements a koanf.Provider that takes a []byte slice and provides it to koanf to be parsed by a koanf.Parser.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RawBytes

type RawBytes struct {
	// contains filtered or unexported fields
}

RawBytes implements a raw bytes provider.

func Provider

func Provider(b []byte) *RawBytes

Provider returns a provider that takes a raw []byte slice to be parsed by a koanf.Parser parser. This should be a nested conf map, like the contents of a raw JSON config file.

func (*RawBytes) Read

func (r *RawBytes) Read() (map[string]interface{}, error)

Read is not supported by rawbytes provider.

func (*RawBytes) ReadBytes

func (r *RawBytes) ReadBytes() ([]byte, error)

ReadBytes returns the raw bytes for parsing.

Jump to

Keyboard shortcuts

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