toolbox

package module
v1.39.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2021 License: MPL-2.0 Imports: 0 Imported by: 14

README

toolbox

Toolbox for Go.

To install this package and the tools it provides:

./build.sh

atexit

Provides functionality similar to the C standard library's atexit() call. To function properly, use atexit.Exit(result) rather than os.Exit(result).

cmdline

Command line handling. Provides the tool genversion for generating version numbers with an embedded date.

collection

Provides type-safe sets for the various primitive types.

desktop

Desktop integration utilities.

errs

Errors that contain stack traces with source locations, along with nested causes, if any.

formats/json

Manipulation of JSON data.

formats/xlsx

Extract text from Excel spreadsheets.

i18n

Internationalization support for applications. Provides the tool go-i18n for generating a template for a localization file from source code.

log/jot

Simple asynchronous logging.

Sample usage:
package main

import "github.com/richardwilkes/toolbox/log/jot"

func main() {
    defer jot.Flush()
    jot.Debug("Debug level")
    jot.Debugf("Debug level with %s", "args")
    jot.Info("Info level")
    jot.Infof("Info level with %s", "args")
    jot.Warn("Warning level")
    jot.Warnf("Warning level with %s", "args")
    jot.Error("Error level")
    jot.Errorf("Error level with %s", "args")
    jot.Fatal(1, "Fatal level")
    jot.Fatalf(1, "Fatal level with %s", "args")    // Will never be reached due to previous line
}

log/jotrotate

Provides a pre-canned way to add jot logging with file rotation, along with command-line options for controlling it.

log/logadapter

This package defines an API to use for logging, which actual logging implementations can implement directly or provide an adapter to use.

It also provides an implementation that just discards data given to it as well as an implementation that wraps another logger and prefixes all output.

log/rotation

Provides file rotation when files hit a given size.

rate

Rate limiting which supports a hierarchy of limiters, each capped by their parent.

softref

Soft references.

taskqueue

Provides a simple asynchronous task queue.

txt

Text utilities.

vcs/git

git repository access

xio

io utilities.

xio/fs

Filesystem utilities.

xio/fs/embedded

Provides an implementation of an embedded filesystem.

xio/fs/embedded/htmltmpl

Provides convenience utilities for using html templates in an embedded filesystem.

xio/fs/embedded/texttmpl

Provides convenience utilities for using text templates in an embedded filesystem.

xio/fs/mkembeddedfs

Tool for generating the embedded filesystem. Note: this utility has been deprecated in favor of using embedded.NewFileSystemFromEmbeddedZip() instead

xio/fs/paths

Platform-specific standard paths.

xio/fs/safe

Safe, atomic saving of files.

xio/fs/zip

Simple zip extraction.

xio/network

Network-related utilities.

xio/network/natpmp

Implementation of NAT-PMP. See https://tools.ietf.org/html/rfc6886

xio/network/xhttp

HTTP-related utilities.

xio/network/xhttp/web

Web server with some standardized logging and handler wrapping.

xio/term

Terminal utilities.

xmath

Math utilities.

xmath/fixed

Fixed-point types of varying sizes. More can be added by adjusting the types created in the generator. These types implement the marshal/unmarshal interfaces for JSON and YAML.

xmath/num

128-bit int and uint types. These types implement the marshal/unmarshal interfaces for JSON and YAML.

xmath/geom

Geometry primitives.

xmath/rand

Randomizer based upon the crypto/rand package.

Documentation

Overview

Package toolbox is the top level package for a collection of utility packages.

Index

Constants

View Source
const (
	MacOS     = "darwin"
	WindowsOS = "windows"
	LinuxOS   = "linux"
)

Constants for comparison to runtime.GOOS

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
Package atexit provides functionality similar to the C standard library's atexit() call.
Package atexit provides functionality similar to the C standard library's atexit() call.
Package cmdline provides command line option handling.
Package cmdline provides command line option handling.
Package desktop provides desktop integration utilities.
Package desktop provides desktop integration utilities.
Package errs implements a detailed error object that provides stack traces with source locations, along with nested causes, if any.
Package errs implements a detailed error object that provides stack traces with source locations, along with nested causes, if any.
formats
json
Package json provides manipulation of JSON data.
Package json provides manipulation of JSON data.
xlsx
Package xlsx provides the ability to extract text from Excel spreadsheets.
Package xlsx provides the ability to extract text from Excel spreadsheets.
log
jot
Package jot provides simple asynchronous logging.
Package jot provides simple asynchronous logging.
jotrotate
Package jotrotate provides a pre-canned way to add jot logging with file rotation, along with command-line options for controlling it.
Package jotrotate provides a pre-canned way to add jot logging with file rotation, along with command-line options for controlling it.
logadapter
Package logadapter defines an API to use for logging, which actual logging implementations can implement directly or provide an adapter to use.
Package logadapter defines an API to use for logging, which actual logging implementations can implement directly or provide an adapter to use.
rotation
Package rotation provides file rotation when files hit a given size.
Package rotation provides file rotation when files hit a given size.
Package rate provides rate limiting which supports a hierarchy of limiters, each capped by their parent.
Package rate provides rate limiting which supports a hierarchy of limiters, each capped by their parent.
Package taskqueue provides a simple asynchronous task queue.
Package taskqueue provides a simple asynchronous task queue.
Package txt provides various text utilities.
Package txt provides various text utilities.
vcs
git
Package git provides simple git repository access.
Package git provides simple git repository access.
xio
Package xio provides i/o utilities.
Package xio provides i/o utilities.
fs
Package fs provides filesystem-related utilities.
Package fs provides filesystem-related utilities.
fs/embedded
Package embedded provides an implementation of an embedded filesystem.
Package embedded provides an implementation of an embedded filesystem.
fs/embedded/htmltmpl
Package htmltmpl provides convenience utilities for using html templates in an embedded filesystem.
Package htmltmpl provides convenience utilities for using html templates in an embedded filesystem.
fs/embedded/texttmpl
Package texttmpl provides convenience utilities for using text templates in an embedded filesystem.
Package texttmpl provides convenience utilities for using text templates in an embedded filesystem.
fs/paths
Package paths provides platform-specific standard paths.
Package paths provides platform-specific standard paths.
fs/safe
Package safe provides safe, atomic saving of files.
Package safe provides safe, atomic saving of files.
fs/zip
Package zip provides simple zip extraction.
Package zip provides simple zip extraction.
network
Package network provides network-related utilities.
Package network provides network-related utilities.
network/natpmp
Package natpmp provides an implementation of NAT-PMP.
Package natpmp provides an implementation of NAT-PMP.
network/xhttp
Package xhttp provides HTTP-related utilities.
Package xhttp provides HTTP-related utilities.
network/xhttp/web
Package web provides a web server with some standardized logging and handler wrapping.
Package web provides a web server with some standardized logging and handler wrapping.
term
Package term provides terminal utilities.
Package term provides terminal utilities.
Package xmath provides math-related utilities.
Package xmath provides math-related utilities.
fixed
Package fixed provides fixed-point values that can be added, subtracted, multiplied and divided.
Package fixed provides fixed-point values that can be added, subtracted, multiplied and divided.
geom
Package geom provides geometry primitives.
Package geom provides geometry primitives.
geom32
Package geom32 provides geometry primitives.
Package geom32 provides geometry primitives.
num
rand
Package rand provides a Randomizer based upon the crypto/rand package.
Package rand provides a Randomizer based upon the crypto/rand package.

Jump to

Keyboard shortcuts

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