utils

package
v0.0.0-...-d124ba8 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HtmlReplacer = strings.NewReplacer(
	"&", "&",
	"<", "&lt;",
	">", "&gt;",

	`"`, "&#34;",

	"'", "&#39;",
)

Functions

func ContainsDotFile

func ContainsDotFile(name string) bool

ContainsDotFile reports whether name contains a path element starting with a period. The name is assumed to be a delimited by forward slashes, as guaranteed by the http.FileSystem interface.

func MapDirOpenError

func MapDirOpenError(originalErr error, name string) error

MapDirOpenError maps the provided non-nil error from opening name to a possibly better non-nil error. In particular, it turns OS-specific errors about opening files in non-directories into os.ErrNotExist. See Issue 18984.

Types

This section is empty.

Jump to

Keyboard shortcuts

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