utils

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: May 15, 2022 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatePassword

func CreatePassword(password string) []byte

func EqualPassword

func EqualPassword(arr1, arr2 []byte) bool

func ListDir

func ListDir(path string, onlyFiles bool) (paths []string, err error)

func ReadJSON

func ReadJSON(obj interface{}, fileName string) (err error)

func ToUUIDArray

func ToUUIDArray(data interface{}) ([]uuid.UUID, error)

func ValidName

func ValidName(name string) bool

func WriteJSON

func WriteJSON(data interface{}, fileName string) (err error)

Types

type ParallelWriter

type ParallelWriter struct {
	Writers []io.Writer
}

func (*ParallelWriter) Write

func (writer *ParallelWriter) Write(p []byte) (n int, err error)

type StringWriter

type StringWriter struct {
	Buffer string
	Size   int
}

func (*StringWriter) Write

func (writer *StringWriter) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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