Package misc

import ""

Overview ▾

package misc has some functions that really don't belong in any particular package.


var (
    DejavusansTtf []byte
    WingoWav      []byte
    WingoPng      []byte
    ClosePng      []byte
    MinimizePng   []byte
    MaximizePng   []byte
var ConfigPaths = xdg.Paths{
    Override:     "",
    XDGSuffix:    "wingo",
    GoImportPath: "",
var DataPaths = xdg.Paths{
    Override:     "",
    XDGSuffix:    "wingo",
    GoImportPath: "",
var ScriptPaths = xdg.Paths{
    Override:     "",
    XDGSuffix:    "wingo",
    GoImportPath: "",

func ConfigFile

func ConfigFile(name string) string

func DataFile

func DataFile(name string) []byte

func Max

func Max(a, b int) int

func Min

func Min(a, b int) int

func Mod

func Mod(x, m int) int

This exists because '%' isn't really modulus; it's *remainder*. e.g., (-1) % 2 = -1 but (-1) mod 2 = 1.

func ReadData

func ReadData()

func Round

func Round(n float64) int

func ScriptConfigPath

func ScriptConfigPath(name string) string

func ScriptPath

func ScriptPath(name string) string

func StackTrace

func StackTrace() string

Prints a simple stack trace without panicing.

XXX: I tried using runtime.Stack, but I couldn't get it to work...