Documentation
¶
Index ¶
- Constants
- func AppendAll[T any](slices ...[]T) []T
- func ExponentialBackoff(retry int) time.Duration
- func FileExists(filePath string) (bool, error)
- func GetHome() string
- func GetPrivateDirectory(projectName string) string
- func GetPrivateDirectoryRoot() string
- func GetProjectName() (string, error)
- func GetWorkingDirectory(projectName string) string
- func Hash(content string) string
- func IsProbablyHTML(source []byte) bool
- func IsRelativePath(str string) bool
- func NormalizeHTMLURL(rawURL string) (string, error)
- func NormalizePathForDBCheck(filePath string) string
- func NormalizeURL(rawURL string) string
- func StrPtr(s *string) string
- func ToPtr[T any](v T) *T
- func UpdateProjectName(projectName string) error
- type ContentType
Constants ¶
View Source
const ( ContentTypeHTML = "HTML" ContentTypeJS = "JS" )
Variables ¶
This section is empty.
Functions ¶
func ExponentialBackoff ¶
func FileExists ¶
func GetPrivateDirectory ¶
func GetPrivateDirectoryRoot ¶
func GetPrivateDirectoryRoot() string
func GetProjectName ¶
func GetWorkingDirectory ¶
func IsRelativePath ¶
func NormalizeHTMLURL ¶
func NormalizePathForDBCheck ¶
func NormalizeURL ¶
func UpdateProjectName ¶
Types ¶
type ContentType ¶
type ContentType = string
func DetectContentType ¶
func DetectContentType(content *string) ContentType
Click to show internal directories.
Click to hide internal directories.