util

package
v3.4.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2014 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Argument

func Argument(test bool)

Panics with "illegal argument" if test is false.

func Assert

func Assert(test bool)

Panics with "assertion failed" if test is false.

func AssertMsg

func AssertMsg(test bool, msg interface{})

Panics with msg if test is false

func Fatal

func Fatal(msg ...interface{})

func FatalErr

func FatalErr(err interface{}, msg ...interface{})

If err != nil, trigger log.Fatal(msg, err)

func Fatalf

func Fatalf(format string, msg ...interface{})

func Fprint

func Fprint(out io.Writer, array ...interface{})

Produces nicely formatted output for multi-dimensional arrays.

func Fprintf

func Fprintf(out io.Writer, format string, array ...interface{})

Produces nicely formatted output for multi-dimensional arrays.

func FprintfFloats

func FprintfFloats(out io.Writer, format string, a [][][]float32)

Produces nicely formatted output.

func FprintfTensors

func FprintfTensors(out io.Writer, format string, a [][][][]float32)

Produces nicely formatted output.

func Log

func Log(msg ...interface{})

func LogErr

func LogErr(err error, msg ...interface{})

Logs the error of non-nil, plus message

func NoExt

func NoExt(file string) string

Remove extension from file name.

func PanicErr

func PanicErr(err error)

Panics if err is not nil. Signals a bug.

func Print

func Print(array ...interface{})

Produces nicely formatted output for multi-dimensional arrays.

func Printf

func Printf(format string, array ...interface{})

Produces nicely formatted output for multi-dimensional arrays.

func Println

func Println(array ...interface{})

Produces nicely formatted output for multi-dimensional arrays.

func Progress

func Progress(progress, total int, msg string)

Set progress bar to progress/total and display msg if GUI is up and running.

func SetProgress

func SetProgress(f func(int, int, string))

Sets the function to be used internally by Progress. Avoids cyclic dependency on engine.

func Sprint

func Sprint(array ...interface{}) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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