This package exposes a registry of data types to support string formats in the go-openapi
toolkit. strfmt
represents a well known string format such as credit card or email. The Go toolkit for OpenAPI specifications knows how to deal with those.
The cmdtest package simplifies testing of command-line interfaces. It provides a simple, cross-platform, shell-like language to express command execution. It can compare actual output with the expected output, and can also update a file with new "golden" output that is deemed correct.
This package implements functionality for encoding and decoding Concise Binary Object Representation (RFC 8949) and CBOR Sequences, with CBOR tags, Golang struct tags (toarray
, keyasint
, omitempty
), float64/32/16
, and big.Intp
.
This package provides a Golang library for parsing Intel HEX files, implementing features like:
robust intelhex parsing (full test coverage)
support i32hex format
two-way converting hex<->bin
trivial but powerful api (only the most commonly used functions)
interface-based IO functions
Keyring provides utility functions for and a common interface to a range of secure credential storage services. Originally developed as part of AWS Vault, a command line tool for securely managing AWS access from developer workstations.
Currently Keyring supports the following backends: macOS/OSX Keychain, Windows pcredential store, Pass, Secret Service, KDE Wallet, Encrypted File.
This package provides a Go implementation of JSON Web Tokens and supports the parsing and verification as well as the generation and signing of JSON Web Tokens. The currently supported signing algorithms are HMAC SHA, RSA, RSA-PSS, and ECDSA, though hooks are present for adding your own.
This package provides a Go implementation of JSON Web Tokens and supports the parsing and verification as well as the generation and signing of JSON Web Tokens. The currently supported signing algorithms are HMAC SHA, RSA, RSA-PSS, and ECDSA, though hooks are present for adding your own.
Datastore is a generic layer of abstraction for data store and database access. It is a simple API with the aim to enable application development in a datastore-agnostic way, allowing datastores to be swapped seamlessly without changing application code. Thus, one can leverage different datastores with different strengths without committing the application to one datastore throughout its lifetime.
Suture provides Erlang-ish supervisor trees for Go. "Supervisor trees" -> "sutree" -> "suture" -> holds your code together when it's trying to die.
It is intended to deal gracefully with the real failure cases that can occur with supervision trees (such as burning all your CPU time endlessly restarting dead services), while also making no unnecessary demands on the "service" code, and providing hooks to perform adequate logging with in a production environment
Ironwood is a routing library with a net.PacketConn
-compatible interface using ed25519.PublicKey
s as addresses. Basically, you use it when you want to communicate with some other nodes in a network, but you can't guarantee that you can directly connect to every node in that network. It was written to test improvements to / replace the routing logic in Yggdrasil, but it may be useful for other network applications.
Golang package for conveniently using named read/write locks. These appear to be especially useful for synchronizing access to session based information in web applications.
The common use case is to use the package level functions, which use a package level set of locks (safe to use from multiple goroutines simultaneously). However, you may also create a new separate set of locks test.
All locks are implemented with read-write mutexes. To use them like a regular mutex, simply ignore the RLock/RUnlock functions.
Package netns allows ultra-simple network namespace handling. NsHandles can be retrieved and set. Note that the current namespace is thread local so actions that set and reset namespaces should use LockOSThread to make sure the namespace doesn't change due to a goroutine switch. It is best to close NsHandles when you are done with them. This can be accomplished via a `defer ns.Close()` on the handle. Changing namespaces requires elevated privileges, so in most cases this code needs to be run as root.
Package netlink provides a simple library for netlink. Netlink is the interface a user-space program in linux uses to communicate with the kernel. It can be used to add and remove interfaces, set up ip addresses and routes, and confiugre ipsec. Netlink communication requires elevated privileges, so in most cases this code needs to be run as root. The low level primitives for netlink are contained in the nl subpackage. This package attempts to provide a high-level interface that is loosely modeled on the iproute2 cli.
Luar is designed to make using Lua from Go more convenient. Go structs, slices and maps can be automatically converted to Lua tables and vice-versa. The resulting conversion can either be a copy or a proxy. In the latter case, any change made to the result will reflect on the source.
Any Go function can be made available to Lua scripts, without having to write C-style wrappers.
Luar support cyclic structures (lists, etc.).
User-defined types can be made available to Lua as well: their exported methods can be called and usual operations such as indexing or arithmetic can be performed.
Accelerate SHA256 computations in pure Go using AVX512 and AVX2 for Intel and ARM64 for ARM. On AVX512 it provides an up to 8x improvement (over 3 GB/s per core) in comparison to AVX2.
This package is designed as a replacement for crypto/sha256
. For Intel CPUs it has two flavors for AVX512 and AVX2 (AVX/SSE are also supported). For ARM CPUs with the Cryptography Extensions, advantage is taken of the SHA2 instructions resulting in a massive performance improvement.
This package uses Golang assembly. The AVX512 version is based on the Intel's "multi-buffer crypto library for IPSec" whereas the other Intel implementations are described in "Fast SHA-256 Implementations on Intel Architecture Processors" by J. Guilford et al.
Package archiver facilitates convenient, cross-platform, high-level archival and compression operations for a variety of formats and compression algorithms.
Features:
stream-oriented APIs
automatically identify archive and compression formats
traverse directories, archive files, and any other file uniformly as
io/fs
file systemscompress and decompress files
create and extract archive files
walk or traverse into archive files
extract only specific files from archives
insert (append) into .tar and .zip archives
read from password-protected 7-Zip files
numerous archive and compression formats supported
extensible (add more formats just by registering them)
cross-platform, static binary
pure Golang (no cgo)
multithreaded Gzip
adjust compression levels
automatically add compressed files to zip archives without re-compressing
open password-protected rar archives
Supported compression formats:
brotli (.br)
bzip2 (.bz2)
flate (.zip)
gzip (.gz)
lz4 (.lz4)
lzip (.lz)
snappy (.sz)
xz (.xz)
zlib (.zz)
zstandard (.zst)
Supported archive formats:
.zip
.tar (including any compressed variants like .tar.gz)
.rar (read-only)
.7z (read-only)