util/
directory v1.92.2
Go to latest Published: Dec 10, 2025 License:BSD-3-Clause
Opens a new window with list of versions in this module.
Latest LatestThis package is not in the latest version of its module.
Opens a new window with license information.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Directories¶
| Path | Synopsis |
|---|---|
Package backoff provides a back-off timer type. | Package backoff provides a back-off timer type. |
Package checkchange defines a utility for determining whether a value has changed since the last time it was checked. | Package checkchange defines a utility for determining whether a value has changed since the last time it was checked. |
Package cibuild reports runtime CI information. | Package cibuild reports runtime CI information. |
Package clientmetric provides client-side metrics whose values get occasionally logged. | Package clientmetric provides client-side metrics whose values get occasionally logged. |
Package cloudenv reports which known cloud environment we're running in. | Package cloudenv reports which known cloud environment we're running in. |
Package cmpver implements a variant of debian version number comparison. | Package cmpver implements a variant of debian version number comparison. |
Package codegen contains shared utilities for generating code. | Package codegen contains shared utilities for generating code. |
Package cstruct provides a helper for decoding binary data that is in the form of a padded C structure. | Package cstruct provides a helper for decoding binary data that is in the form of a padded C structure. |
ctxkey provides type-safe key-value pairs for use with context.Context. | ctxkey provides type-safe key-value pairs for use with context.Context. |
Package deephash hashes a Go value recursively, in a predictable order, without looping. | Package deephash hashes a Go value recursively, in a predictable order, without looping. |
testtype Package testtype contains types for testing deephash. | Package testtype contains types for testing deephash. |
Package dirwalk contains code to walk a directory. | Package dirwalk contains code to walk a directory. |
Package dnsname contains string functions for working with DNS names. | Package dnsname contains string functions for working with DNS names. |
Package eventbus provides an in-process event bus. | Package eventbus provides an in-process event bus. |
debug-democommand debug-demo is a program that serves a bus's debug interface over HTTP, then generates some fake traffic from a handful of clients. | debug-demo is a program that serves a bus's debug interface over HTTP, then generates some fake traffic from a handful of clients. |
eventbustest Package eventbustest provides helper methods for testing an eventbus.Bus. | Package eventbustest provides helper methods for testing an eventbus.Bus. |
Package execqueue implements an ordered asynchronous queue for executing functions. | Package execqueue implements an ordered asynchronous queue for executing functions. |
Package expvarx provides some extensions to the expvar package. | Package expvarx provides some extensions to the expvar package. |
The goroutines package contains utilities for tracking and getting active goroutines. | The goroutines package contains utilities for tracking and getting active goroutines. |
Package groupmember verifies group membership of the provided user on the local system. | Package groupmember verifies group membership of the provided user on the local system. |
Package hashx provides a concrete implementation of hash.Hash that operates on a particular block size. | Package hashx provides a concrete implementation of hash.Hash that operates on a particular block size. |
Package httphdr implements functionality for parsing and formatting standard HTTP headers. | Package httphdr implements functionality for parsing and formatting standard HTTP headers. |
Package httpm has shorter names for HTTP method constants. | Package httpm has shorter names for HTTP method constants. |
Package limiter provides a keyed token bucket rate limiter. | Package limiter provides a keyed token bucket rate limiter. |
Package lineiter iterates over lines in things. | Package lineiter iterates over lines in things. |
Package lineread reads lines from files. | Package lineread reads lines from files. |
Package linuxfw returns the kind of firewall being used by the kernel. | Package linuxfw returns the kind of firewall being used by the kernel. |
linuxfwtest Package linuxfwtest contains tests for the linuxfw package. | Package linuxfwtest contains tests for the linuxfw package. |
Package lru contains a typed Least-Recently-Used cache. | Package lru contains a typed Least-Recently-Used cache. |
Package mak helps make maps. | Package mak helps make maps. |
Package multierr provides a simple multiple-error type. | Package multierr provides a simple multiple-error type. |
Package must assists in calling functions that must succeed. | Package must assists in calling functions that must succeed. |
nocasemaps provides efficient functions to set and get entries in Go maps keyed by a string, where the string is always lower-case. | nocasemaps provides efficient functions to set and get entries in Go maps keyed by a string, where the string is always lower-case. |
Package osdiag provides loggers for OS-specific diagnostic information. | Package osdiag provides loggers for OS-specific diagnostic information. |
internal/wsc Package wsc provides access to the Windows Security Center API. | Package wsc provides access to the Windows Security Center API. |
Package osuser implements OS user lookup. | Package osuser implements OS user lookup. |
Package pidowner handles lookups from process ID to its owning user. | Package pidowner handles lookups from process ID to its owning user. |
Package pool contains a generic type for managing a pool of resources; for example, connections to a database, or to a remote service. | Package pool contains a generic type for managing a pool of resources; for example, connections to a database, or to a remote service. |
Package precompress provides build- and serving-time support for precompressed static resources, to avoid the cost of repeatedly compressing unchanging resources. | Package precompress provides build- and serving-time support for precompressed static resources, to avoid the cost of repeatedly compressing unchanging resources. |
Package progresstracking provides wrappers around io.Reader and io.Writer that track progress. | Package progresstracking provides wrappers around io.Reader and io.Writer that track progress. |
Package prompt provides a simple way to prompt the user for input. | Package prompt provides a simple way to prompt the user for input. |
Package quarantine sets platform specific "quarantine" attributes on files that are received from other hosts. | Package quarantine sets platform specific "quarantine" attributes on files that are received from other hosts. |
Package race contains a helper to "race" two functions, returning the first successful result. | Package race contains a helper to "race" two functions, returning the first successful result. |
Package racebuild exports a constant about whether the current binary was built with the race detector. | Package racebuild exports a constant about whether the current binary was built with the race detector. |
Package rands contains utility functions for randomness. | Package rands contains utility functions for randomness. |
Package reload contains functions that allow periodically reloading a value (e.g. | Package reload contains functions that allow periodically reloading a value (e.g. |
Package ringlog contains a limited-size concurrency-safe generic ring log. | Package ringlog contains a limited-size concurrency-safe generic ring log. |
Package safediff computes the difference between two lists. | Package safediff computes the difference between two lists. |
Package set contains set types. | Package set contains set types. |
Package singleflight provides a duplicate function call suppression mechanism. | Package singleflight provides a duplicate function call suppression mechanism. |
Package slicesx contains some helpful generic slice functions. | Package slicesx contains some helpful generic slice functions. |
Package stringsx provides additional string manipulation functions that aren't in the standard library's strings package or go4.org/mem. | Package stringsx provides additional string manipulation functions that aren't in the standard library's strings package or go4.org/mem. |
Package syspolicy contains the implementation of system policy management. | Package syspolicy contains the implementation of system policy management. |
internal Package internal contains miscellaneous functions and types that are internal to the syspolicy packages. | Package internal contains miscellaneous functions and types that are internal to the syspolicy packages. |
internal/loggerx Package loggerx provides logging functions to the rest of the syspolicy packages. | Package loggerx provides logging functions to the rest of the syspolicy packages. |
internal/metrics Package metrics provides logging and reporting for policy settings and scopes. | Package metrics provides logging and reporting for policy settings and scopes. |
pkey Package pkey defines the keys used to store system policies in the registry. | Package pkey defines the keys used to store system policies in the registry. |
policyclient Package policyclient contains the minimal syspolicy interface as needed by client code using syspolicy. | Package policyclient contains the minimal syspolicy interface as needed by client code using syspolicy. |
policytest Package policytest contains test helpers for the syspolicy packages. | Package policytest contains test helpers for the syspolicy packages. |
ptype Package ptype contains types used by syspolicy. | Package ptype contains types used by syspolicy. |
rsop Package rsop facilitates source.Store registration via RegisterStore and provides access to the effective policy merged from all registered sources via PolicyFor. | Package rsop facilitates source.Store registration via RegisterStore and provides access to the effective policy merged from all registered sources via PolicyFor. |
setting Package setting contains types for defining and representing policy settings. | Package setting contains types for defining and representing policy settings. |
source Package source defines interfaces for policy stores, facilitates the creation of policy sources, and provides functionality for reading policy settings from these sources. | Package source defines interfaces for policy stores, facilitates the creation of policy sources, and provides functionality for reading policy settings from these sources. |
Package sysresources provides OS-independent methods of determining the resources available to the current system. | Package sysresources provides OS-independent methods of determining the resources available to the current system. |
Package testenv provides utility functions for tests. | Package testenv provides utility functions for tests. |
Package topk defines a count-min sketch and a cheap probabilistic top-K data structure that uses the count-min sketch to track the top K items in constant memory and O(log(k)) time. | Package topk defines a count-min sketch and a cheap probabilistic top-K data structure that uses the count-min sketch to track the top K items in constant memory and O(log(k)) time. |
Package truncate provides a utility function for safely truncating UTF-8 strings to a fixed length, respecting multi-byte codepoints. | Package truncate provides a utility function for safely truncating UTF-8 strings to a fixed length, respecting multi-byte codepoints. |
Package usermetric provides a container and handler for user-facing metrics. | Package usermetric provides a container and handler for user-facing metrics. |
Package vizerror provides types and utility funcs for handling visible errors that are safe to display to end users. | Package vizerror provides types and utility funcs for handling visible errors that are safe to display to end users. |
Package winutil contains misc Windows/Win32 helper functions. | Package winutil contains misc Windows/Win32 helper functions. |
conpty Package conpty implements support for Windows pseudo-consoles. | Package conpty implements support for Windows pseudo-consoles. |
policy Package policy contains higher-level abstractions for accessing Windows enterprise policies. | Package policy contains higher-level abstractions for accessing Windows enterprise policies. |
Package zstdframe provides functionality for encoding and decoding independently compressed zstandard frames. | Package zstdframe provides functionality for encoding and decoding independently compressed zstandard frames. |
Click to show internal directories.
Click to hide internal directories.