utils

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DirExists

func DirExists(path string) (bool, error)

DirExists checks if a directory exists at the given path. Returns (true, nil) if the directory exists, (false, nil) if it does not exist, or (false, err) if an error other than "not exist" occurs.

func FileExists

func FileExists(path string) (bool, error)

FileExists checks if a file exists at the given path. Returns (true, nil) if the file exists, (false, nil) if it does not exist, or (false, err) if an error other than "not exist" occurs.

func Hash

func Hash(s string) string

Hash returns a stable hexadecimal FNV-1a 64-bit hash for s. The same input always produces the same identifier string.

func WriteToFile

func WriteToFile(data []byte, path string) error

WriteToFile Write data to file and create all parent folders if needed

Types

This section is empty.

Jump to

Keyboard shortcuts

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