util

package
v0.0.0-...-768744d Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseQuietly

func CloseQuietly(cl Closeable)

func ContainsMarkdown

func ContainsMarkdown(dirPath string) bool

func ContentType

func ContentType(urlPath string) string

func IsDirectory

func IsDirectory(dirPath string) bool

func IsFile

func IsFile(dirPath string) bool

func ProjectRoot

func ProjectRoot() string

func RemoveAllQuietly

func RemoveAllQuietly(path string)

func ResolveUrlPath

func ResolveUrlPath(urlPath string, rootDir string) (string, error)

func SameFilePath

func SameFilePath(p1 string, p2 string) (bool, error)

func ToAbsoluteDirectory

func ToAbsoluteDirectory(dirPath string) (string, error)

func ToAbsoluteFile

func ToAbsoluteFile(filePath string) (string, error)

func ToAbsoluteUrlPath

func ToAbsoluteUrlPath(filePath string, rootDir string) (string, error)

func UrlPathToDirectory

func UrlPathToDirectory(urlDirPath string, rootDir string) (string, error)

func UrlPathToFile

func UrlPathToFile(urlFilePath string, rootDir string) (string, error)

func WriteData

func WriteData(w http.ResponseWriter, urlPath string, data []byte) error

Types

type Closeable

type Closeable interface {
	Close() error
}

Jump to

Keyboard shortcuts

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