misc

package module
v0.0.0-...-bdd9120 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: BSD-3-Clause Imports: 13 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsDir

func AbsDir(p string, nthR2L int) (string, error)

func AllFileLines

func AllFileLines(file string) ([]string, error)

func AllFiles

func AllFiles(patterns []string, suffix string, singleDir bool) ([]string, error)

func AllLines

func AllLines(r io.Reader) []string

func DecodeCompileTimeString

func DecodeCompileTimeString(str string) (string, error)

func FindDirectory

func FindDirectory(name string) error

func FindFile

func FindFile(name string) error

func IndexStrings

func IndexStrings(a []string, str string) int

func LCFirst

func LCFirst(str string) string

func Split

func Split(str string, sep string) []string

func ToJSON

func ToJSON(x interface{}) []byte

func ToJSONString

func ToJSONString(x interface{}) string

func ToPlainJSON

func ToPlainJSON(v interface{}) []byte

func ToPlainJSONString

func ToPlainJSONString(v interface{}) string

func ToPrettyJSON

func ToPrettyJSON(x interface{}) []byte

func ToPrettyJSONString

func ToPrettyJSONString(x interface{}) string

func UCFirst

func UCFirst(str string) string

func UnescapeUnicode

func UnescapeUnicode(str string) string

func WriteFileAtomic

func WriteFileAtomic(file string, data []byte, perm os.FileMode) error

WriteFileAtomic writes file to temp and atomically move when everything else succeeds.

func WriteUnixTextFile

func WriteUnixTextFile(filename string, data []byte, perm os.FileMode) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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