package util
import "github.com/jdkato/prose/internal/util"
Package util contains internals used across the other prose packages.
Index ¶
- func CheckError(err error)
- func ContainsAny(a string, b []string) bool
- func HasAnySuffix(a string, slice []string) bool
- func IsAlnum(c byte) bool
- func IsLetter(c byte) bool
- func IsPunct(c byte) bool
- func IsSpace(c byte) bool
- func Min(a, b int) int
- func ReadDataFile(path string) []byte
- func StringInSlice(a string, slice []string) bool
Functions ¶
func CheckError ¶
func CheckError(err error)
CheckError panics if `err` is not `nil`.
func ContainsAny ¶
ContainsAny determines if the string a contains any fo the strings contained in the slice b.
func HasAnySuffix ¶
HasAnySuffix determines if the string a has any suffixes contained in the slice b.
func IsAlnum ¶
IsAlnum determines if a character is a letter or a digit.
func IsLetter ¶
IsLetter determines if a character is letter.
func IsPunct ¶
IsPunct determines if a character is a punctuation symbol.
func IsSpace ¶
IsSpace determines if a character is a whitespace character.
func Min ¶
Min returns the minimum of `a` and `b`.
func ReadDataFile ¶
ReadDataFile reads data from a file, panicking on any errors.
func StringInSlice ¶
StringInSlice determines if `slice` contains the string `a`.
Source Files ¶
- Version
- v1.1.1
- Published
- Aug 14, 2019
- Platform
- linux/amd64
- Imports
- 3 packages
- Last checked
- 8 hours ago –
Tools for package owners.