file

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2019 License: MIT Imports: 2 Imported by: 820

Documentation

Overview

Package file implements a koanf.Provider that reads raw bytes from files on disk to be used with a koanf.Parser to parse into conf maps.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

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

File implements a File provider.

func Provider

func Provider(path string) *File

Provider returns a file provider.

func (*File) Read

func (f *File) Read() (map[string]interface{}, error)

Read is not supported by the file provider.

func (*File) ReadBytes

func (f *File) ReadBytes() ([]byte, error)

ReadBytes reads the contents of a file on disk and returns the bytes.

Jump to

Keyboard shortcuts

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