Documentation
¶
Index ¶
- Constants
- func ContainsInt64(haystack []int64, needle int64) bool
- func FilterInt64(slice []int64, filter func(int64) bool) (res []int64)
- func Getenv(key, fallback string) string
- func GetenvInt(key string, fallback int) int
- func HashFile(filename string) (hash string, err error)
- func IterateFiles(dir string, extension string, callback func(string) error) (err error)
- func MaxInt(values ...int) (max int)
- func MaxInt64(values ...int64) (max int64)
- func OutputJSONOrErr(res interface{}, err error)
- func ProcessLinePairs(filename string, allowLeftover bool, parser func(string, string) error) (err error)
- type BooleanYesNo
- type MathML
Constants ¶
const MathMLNamespace = "http://www.w3.org/1998/Math/MathML"
MathMLNamespace is the xml namespace of mathml
Variables ¶
This section is empty.
Functions ¶
func ContainsInt64 ¶
ContainsInt64 checks if a slice of int64s contains an element
func FilterInt64 ¶
FilterInt64 filters a slice of int64 elements and returns only those
func GetenvInt ¶
GetenvInt is the same as Getenv, except that it turns values into int64 it panics iff the variable exists but is not a valid int64
func IterateFiles ¶
IterateFiles iterates over files in a directory with a given extension
func OutputJSONOrErr ¶
func OutputJSONOrErr(res interface{}, err error)
OutputJSONOrErr outputs res as json if no error message is provided
Types ¶
type BooleanYesNo ¶
type BooleanYesNo bool
BooleanYesNo represents a boolean that is xml encoded as "yes" or "no"
func (BooleanYesNo) MarshalText ¶
func (byesno BooleanYesNo) MarshalText() (text []byte, err error)
MarshalText turns a BooleanYesNo into a string
func (*BooleanYesNo) UnmarshalText ¶
func (byesno *BooleanYesNo) UnmarshalText(text []byte) (err error)
UnmarshalText unmarshals text into a string
type MathML ¶
type MathML struct {
// contains filtered or unexported fields
}
MathML represents a MathML Element with semantics and annotation component
func ParseMathML ¶
ParseMathML parses a new MathML Element
func (*MathML) Copy ¶
Copy makes a copy of this struct, allowing NavigateAnnotation() to not change the original object
func (*MathML) NavigateAnnotation ¶
NavigateAnnotation navigates within an <annotation> element and updates the semantics accordingly if the xpth is invalid or an error occurs, annotation and semantics remain unchanged