Documentation ¶
Index ¶
- Variables
- func CutFrontPath(s string, length int) string
- func CutStart(s string, length int, delim string, prefixIfCut bool) string
- func DirFromPath(p string) string
- func FilenameFromPath(p string) string
- func FormatLabel(s string) string
- func GetPkgPath(s any) string
- func Jsonify(v interface{}, indent int) ([]byte, error)
- func MustInt(s string, min, max, dflt int) int
- func NameFromPath(p string) string
- func NicePath(forceSuffixSlash bool, p ...string) string
- func SimpleSlugify(s string) string
- func UnJsonify(data []byte, v interface{}) error
- func WrapSlash(p string) string
Constants ¶
This section is empty.
Variables ¶
View Source
var TitleCaser = cases.Title(language.English)
Functions ¶
func CutFrontPath ¶ added in v1.0.6
Cut the front of a path, and add "..." if it was cut.
func CutStart ¶ added in v1.0.6
Cut the string if it is longer than the specified length, and add "..." if it was cut.
func DirFromPath ¶ added in v1.0.6
DirFromPath gets the directory from a path
func FilenameFromPath ¶
FilenameFromPath gets the filename from a path
func FormatLabel ¶ added in v1.6.2
func NameFromPath ¶
NameFromPath gets the filename from a path and removes the extension
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.