utils

package
v0.1.0-alpha.6 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToString

func BytesToString(b []byte) string

BytesToString converts byte slice to string.

func CreateIfNotExists

func CreateIfNotExists(path string, isDir bool) error

CreateIfNotExists creates a file or a directory only if it does not already exist.

func IsExist

func IsExist(path string) bool

IsExist checks if a file or directory exists

func MakeDir

func MakeDir(dir string) error

func RelToCwd

func RelToCwd(path string) string

func RemoveEmptyLine

func RemoveEmptyLine(s string) string

func RemoveIfExist

func RemoveIfExist(path string) error

func ReplaceSubscript

func ReplaceSubscript(s string) string

func ReplaceSuperscript

func ReplaceSuperscript(s string) string

func StringToBytes

func StringToBytes(s string) []byte

StringToBytes converts string to byte slice.

func Truncate

func Truncate(filename string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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