common

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2026 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContentTypeHTML = "HTML"
	ContentTypeJS   = "JS"
)

Variables

This section is empty.

Functions

func AppendAll

func AppendAll[T any](slices ...[]T) []T

func ExponentialBackoff

func ExponentialBackoff(retry int) time.Duration

func FileExists

func FileExists(filePath string) (bool, error)

func GetHome

func GetHome() string

func GetPrivateDirectory

func GetPrivateDirectory(projectName string) string

func GetPrivateDirectoryRoot

func GetPrivateDirectoryRoot() string

func GetProjectName

func GetProjectName() (string, error)

func GetWorkingDirectory

func GetWorkingDirectory(projectName string) string

func Hash

func Hash(content string) string

func IsRelativePath

func IsRelativePath(str string) bool

func NormalizeHTMLURL

func NormalizeHTMLURL(rawURL string) (string, error)

func NormalizePathForDBCheck

func NormalizePathForDBCheck(filePath string) string

func NormalizeURL

func NormalizeURL(rawURL string) string

func StrPtr

func StrPtr(s *string) string

func ToPtr

func ToPtr[T any](v T) *T

func UpdateProjectName

func UpdateProjectName(projectName string) error

Types

type ContentType

type ContentType = string

func DetectContentType

func DetectContentType(content *string) ContentType

Jump to

Keyboard shortcuts

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