Documentation ¶
Overview ¶
Go programming helpers for common miscellaneous needs.
Index ¶
- Variables
- func E(msg string) error
- func F(thing interface{}) float64
- func IfB(cond, ifTrue, ifFalse bool) bool
- func IfF64(cond bool, ifTrue, ifFalse float64) float64
- func IfI(cond bool, ifTrue, ifFalse int) int
- func IfI16(cond bool, ifTrue, ifFalse int16) int16
- func IfI32(cond bool, ifTrue, ifFalse int32) int32
- func IfI64(cond bool, ifTrue, ifFalse int64) int64
- func IfS(cond bool, ifTrue string, ifFalse string) string
- func IfU32(cond bool, ifTrue, ifFalse uint32) uint32
- func IfU64(cond bool, ifTrue, ifFalse uint64) uint64
- func IfW(cond bool, ifTrue, ifFalse io.Writer) io.Writer
- func IfX(cond bool, ifTrue, ifFalse interface{}) interface{}
- func JsonDecodeFromFile(fromfilepath string, into interface{}) (err error)
- func JsonEncodeToFile(from interface{}, tofilepath string) (err error)
- func LogError(err error)
- func ParseVersion(verstr string) (majorMinor [2]int, both float64)
- func S(thing interface{}) string
- func Str(thing interface{}) string
- func Strf(format string, args ...interface{}) string
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// The string format used in LogError().
LogErrorFormat = "%v"
)
Functions ¶
func IfX ¶
func IfX(cond bool, ifTrue, ifFalse interface{}) interface{}
Returns `ifTrue` if `cond` is `true`, otherwise returns `ifFalse`.
func JsonDecodeFromFile ¶
func JsonEncodeToFile ¶
func LogError ¶
func LogError(err error)
A convenience short-hand for `log.Println(fmt.Sprintf(LogErrorFormat, err))` if `err` isn't `nil`.
func ParseVersion ¶
Attempts to extract major and minor version components from a string that begins with a version number. Example: returns []int{3, 2} and float64(3.2) for a `verstr` that is `3.2.0 - Build 8.15.10.2761`.
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Spatial data types & helpers for use in 3D apps (AABB, Frustum, bounding volumes etc)
|
Spatial data types & helpers for use in 3D apps (AABB, Frustum, bounding volumes etc) |
Go programming helpers for common database needs.
|
Go programming helpers for common database needs. |
umgo
Go programming helpers for common MongoDB needs.
|
Go programming helpers for common MongoDB needs. |
Go programming helpers for common file-system needs.
|
Go programming helpers for common file-system needs. |
Go programming helpers for various miscellaneous geo-computing needs.
|
Go programming helpers for various miscellaneous geo-computing needs. |
Go programming helpers for common graphics and imaging needs.
|
Go programming helpers for common graphics and imaging needs. |
Go programming helpers for common hashing needs.
|
Go programming helpers for common hashing needs. |
Go programming helpers for common networking needs.
|
Go programming helpers for common networking needs. |
Go programming helpers for common maths needs; plus vectors, matrices and quaternions.
|
Go programming helpers for common maths needs; plus vectors, matrices and quaternions. |
Go programming helpers for common 'pseudo-generic' typed-slice needs.
|
Go programming helpers for common 'pseudo-generic' typed-slice needs. |
Go programming helpers for common string-processing needs.
|
Go programming helpers for common string-processing needs. |
Click to show internal directories.
Click to hide internal directories.