util

package
v0.0.0-...-0f43fba Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(src, dst, user string) error

func CreateDirectories

func CreateDirectories(path, user string, perm os.FileMode) error

func GetNullableInt64

func GetNullableInt64(nullValue *sql.NullInt64) *int64

func GetNullableString

func GetNullableString(nullValue *sql.NullString) *string

func PrintReadyBanner

func PrintReadyBanner()

func RemoveFile

func RemoveFile(path string) error

func RemoveGlob

func RemoveGlob(path string) (err error)

func SafeStringVal

func SafeStringVal(str *string) string

func SetPermissions

func SetPermissions(path, username string) error

func SetPermissionsRecursive

func SetPermissionsRecursive(path, user, group string) error

func SplitPath

func SplitPath(filepath string) (filename string, path string)

func StringVal

func StringVal[T ~int | ~int8 | ~int16 | ~int32 |
	~int64 | ~uint | ~uint8 | ~uint16 | ~uint32 |
	~uint64 | ~float32 | ~float64](num T) string

func TrimmedString

func TrimmedString(str *string) string

func WriteError

func WriteError(w http.ResponseWriter, r *http.Request, err error, code int)

func WriteResponse

func WriteResponse(w http.ResponseWriter, r *http.Request, data any, code int)

Types

This section is empty.

Jump to

Keyboard shortcuts

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