format

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: AGPL-3.0 Imports: 13 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// DirUserGroupRead is for directories that should be readable by owner and group (rwxr-x---)
	DirUserGroupRead fs.FileMode = 0750

	// FilePublicRead is for files that should be world-readable (rw-r--r--)
	// Used for documentation, assets, and other public files
	FilePublicRead fs.FileMode = 0644

	// FileUserReadWrite is for files that should only be readable by owner (rw-------)
	// Used for sensitive files like logs, secrets, and configuration
	FileUserReadWrite fs.FileMode = 0600
)

Common file permission constants used throughout the application. These constants provide named values for file and directory permissions instead of using magic numbers.

Variables

This section is empty.

Functions

func CalculateZipFileSize

func CalculateZipFileSize(data []byte) uint64

CalculateZipFileSize returns the aggregated uncompressed size of files inside a zip archive

func ContainsI

func ContainsI(a string, b string) bool

func ExtractHTMLTitleFromB64Html

func ExtractHTMLTitleFromB64Html(body []byte) string

func GetPlatformAgnosticNewline

func GetPlatformAgnosticNewline() string

func IsDirectory

func IsDirectory(path string) bool

func ParseHumanSize

func ParseHumanSize(size string) (int64, error)

ParseHumanSize parses a human-readable size string (e.g., "500Mb", "2Gb") into bytes

func ParseISO8601

func ParseISO8601(dateStr string) time.Time

func PrettyPrintYAML

func PrettyPrintYAML(yamlStr string) (string, error)

func RandomStringN

func RandomStringN(n int) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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