Package misc

import "github.com/BurntSushi/wingo-conc/misc"
Overview
Index

Overview ▾

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

Variables

var (
    DejavusansTtf []byte
    WingoWav      []byte
    WingoPng      []byte
    ClosePng      []byte
    MinimizePng   []byte
    MaximizePng   []byte
)
var ConfigPaths = xdg.Paths{
    Override:     "",
    XDGSuffix:    "wingo",
    GoImportPath: "github.com/BurntSushi/wingo-conc/config",
}
var DataPaths = xdg.Paths{
    Override:     "",
    XDGSuffix:    "wingo",
    GoImportPath: "github.com/BurntSushi/wingo-conc/data",
}
var ScriptPaths = xdg.Paths{
    Override:     "",
    XDGSuffix:    "wingo",
    GoImportPath: "github.com/BurntSushi/wingo-conc/config",
}

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...