This is a Go library for detecting the user's home directory without the use of cgo, so the library can be used in cross-compilation environments.
Usage is simple, just call homedir.Dir() to get the home directory for a user, and homedir.Expand() to expand the ~ in a path to the home directory.
Why not just use os/user? The built-in os/user package requires cgo on Darwin systems. This means that any Go code that uses that package cannot cross compile. But 99% of the time the use for os/user is just to retrieve the home directory, which we can do for the current user without cgo. This library does that, enabling cross-compilation.
This package implements a functionality which can be used in instrument code, expose application metrics, and profile runtime performance in a flexible manner. It makes use of a MetricSink interface to support delivery to any type of backend.
Currently the following sinks are provided:
StatsiteSink : Sinks to a statsite instance (TCP)
StatsdSink: Sinks to a StatsD / statsite instance (UDP)
PrometheusSink: Sinks to a Prometheus metrics endpoint (exposed via HTTP for scrapes)
InmemSink : Provides in-memory aggregation, can be used to export stats
FanoutSink : Sinks to multiple sinks. Enables writing to multiple statsite instances for example
BlackholeSink : Sinks to nowhere
This package implements a functionality which can be used in instrument code, expose application metrics, and profile runtime performance in a flexible manner. It makes use of a MetricSink interface to support delivery to any type of backend.
Currently the following sinks are provided:
StatsiteSink : Sinks to a statsite instance (TCP)
StatsdSink: Sinks to a StatsD / statsite instance (UDP)
PrometheusSink: Sinks to a Prometheus metrics endpoint (exposed via HTTP for scrapes)
InmemSink : Provides in-memory aggregation, can be used to export stats
FanoutSink : Sinks to multiple sinks. Enables writing to multiple statsite instances for example
BlackholeSink : Sinks to nowhere
This package provides factors out an opinionated selection of internal packages and functionality from the Go standard library. Currently this consists mostly of packages and testing code from within the Go tool implementation.
Included are the following:
dirhash: calculate hashes over directory trees the same way that the Go tool does.
goproxytest: a GOPROXY implementation designed for test use.
gotooltest: Use the Go tool inside test scripts (see testscript below)
imports: list of known architectures and OSs, and support for reading import import statements.
modfile: read and write go.mod files while preserving formatting and comments.
module: module paths and versions.
par: do work in parallel.
semver: semantic version parsing.
testenv: information on the current testing environment.
testscript: script-based testing based on txtar files
txtar: simple text-based file archives for testing.
This package provides factors out an opinionated selection of internal packages and functionality from the Go standard library. Currently this consists mostly of packages and testing code from within the Go tool implementation.
Included are the following:
dirhash: calculate hashes over directory trees the same way that the Go tool does.
goproxytest: a GOPROXY implementation designed for test use.
gotooltest: Use the Go tool inside test scripts (see testscript below)
imports: list of known architectures and OSs, and support for reading import import statements.
modfile: read and write go.mod files while preserving formatting and comments.
module: module paths and versions.
par: do work in parallel.
semver: semantic version parsing.
testenv: information on the current testing environment.
testscript: script-based testing based on txtar files
txtar: simple text-based file archives for testing.
A .gitignore parser for Go.
Java properties scanner for Go
This package provides a hashing function.
This package provides HTTP header constants.
This package provides memcache client and server functionality.
Converts markdown into roff (man pages).
Colorstring provides functions for colorizing strings for terminal output.
This package can generate ASCII line graphs in Golang.
Converts markdown into roff (man pages).
This package converts Markdown into Roff Man pages.
This package is a simple Golang implementation of tag parser.
Go library provides utilities for building command line interfaces.
This package provides a transport-agnostic, filesystem metadata manifest system.
Package colorstring provides functions for colorizing strings for terminal output.
PKI based identities for use in go-libp2p.
This package provides Gradle templates for Smithy code generators.
This package provides an IDLE extension for go-imap.
This package provides a terminal event input handler and driver.
Package arrow provides an implementation of Apache Arrow.