commons

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SLV           = "SLV"
	Version uint8 = 1
)

Variables

This section is empty.

Functions

func AppDataDir

func AppDataDir() string

func Compress

func Compress(data []byte) (compressedBytes []byte, err error)

func Decode

func Decode(encoded string) (data []byte)

func Decompress

func Decompress(compressedBytes []byte) (data []byte, err error)

func Deserialize

func Deserialize(serialized string, data interface{}) (err error)

func DirExists

func DirExists(path string) bool

func Encode

func Encode(data []byte) (encoded string)

func FileExists

func FileExists(path string) bool

func ReadFromFile

func ReadFromFile(filePath string) ([]byte, error)

func ReadFromYAML

func ReadFromYAML(filePath string, out interface{}) error

func ResetAppDataDir

func ResetAppDataDir() error

func Serialize

func Serialize(data interface{}) (string, error)

func WriteToFile

func WriteToFile(filePath string, content []byte) error

func WriteToYAML

func WriteToYAML(filePath string, data interface{}) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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