stringutils

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NowFunc = time.Now

NowFunc is used to get the current time. It defaults to time.Now, but can be overridden in tests.

View Source
var UserHomeDirFunc = os.UserHomeDir

UserHomeDirFunc is used to get the user's home directory. It defaults to os.UserHomeDir but can be overridden in tests.

Functions

func FormatDate

func FormatDate(format string, date *time.Time) string

FormatDate formats given date as Django's format date style (most of them). https://docs.djangoproject.com/en/5.1/ref/templates/builtins/#date

func GetFormattedFilename

func GetFormattedFilename(s string, req *http.Request) string

GetFormattedFilename returns formated filename.

Types

This section is empty.

Jump to

Keyboard shortcuts

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