util

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterFileNames

func FilterFileNames(fileNames []string, language string) (found []string)

Filters a list of file names by the given language extension.

func GetConfigDirectory

func GetConfigDirectory() string

func GetStringFromStdout

func GetStringFromStdout(function func()) string

Grabs a string from a function that prints to os.Stdout. Especially useful for testing the output of print functions.

func GetWantFile

func GetWantFile(wantFile string, t *testing.T) string

Return the contents of a file as a string. Useful for comparing the output of commands that print a lot of text, like "about" or "help."

func HashFile

func HashFile(filePath string) (uint32, error)

Converts a file from the filePath into a hashed value

func IsValidURL

func IsValidURL(str string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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