localstore

package
v0.0.0-...-bae2323 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalStore

type LocalStore struct {
	ConfDir string
}

LocalStore provides reading and writing application data to the user's configuration directory.

func NewLocalStore

func NewLocalStore() *LocalStore

NewLocalStore returns a localStore instance.

func (*LocalStore) Load

func (l *LocalStore) Load(filename string) ([]byte, error)

Load reads the given file in the user's configuration directory and returns its contents.

func (*LocalStore) Store

func (l *LocalStore) Store(data []byte, filename string) error

Store writes data to the user's configuration directory at the given filename.

Jump to

Keyboard shortcuts

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