util

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package util contains internals used across the other prose packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckError

func CheckError(err error)

CheckError panics if `err` is not `nil`.

func ContainsAny

func ContainsAny(a string, b []string) bool

ContainsAny determines if the string a contains any fo the strings contained in the slice b.

func HasAnySuffix

func HasAnySuffix(a string, slice []string) bool

HasAnySuffix determines if the string a has any suffixes contained in the slice b.

func IsAlnum

func IsAlnum(c byte) bool

IsAlnum determines if a character is a letter or a digit.

func IsLetter

func IsLetter(c byte) bool

IsLetter determines if a character is letter.

func IsPunct

func IsPunct(c byte) bool

IsPunct determines if a character is a punctuation symbol.

func IsSpace

func IsSpace(c byte) bool

IsSpace determines if a character is a whitespace character.

func Min

func Min(a, b int) int

Min returns the minimum of `a` and `b`.

func ReadDataFile

func ReadDataFile(path string) []byte

ReadDataFile reads data from a file, panicking on any errors.

func StringInSlice

func StringInSlice(a string, slice []string) bool

StringInSlice determines if `slice` contains the string `a`.

Types

This section is empty.

Jump to

Keyboard shortcuts

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