util

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnvBoolDefault added in v0.1.4

func GetEnvBoolDefault(envVar string, defaultValue bool) bool

GetEnvBoolDefault is similar to GetEnvDefault, but with booleans instead of strings

func GetEnvDefault added in v0.1.4

func GetEnvDefault(envVar, defaultValue string) string

GetEnvDefault returns the value of the environment variable, or a default value if the environment variable is not defined or is an empty string

func IsTextFile added in v0.1.4

func IsTextFile(file *os.File) error

IsTextFile returns an error if the file is not of content-type 'text/plain'

func MarkdownCodify added in v0.1.4

func MarkdownCodify(s string) string

MarkdownCodify returns a markdown code string https://www.markdownguide.org/basic-syntax/#code

Types

This section is empty.

Jump to

Keyboard shortcuts

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