An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 3.6% on proxy.golang.org
Top 0.5% dependent packages on proxy.golang.org
Top 0.2% dependent repos on proxy.golang.org
Top 0.9% docker downloads on proxy.golang.org

proxy.golang.org : github.com/kortschak/utter

Package utter implements a deep pretty printer for Go data structures to aid data snapshotting. A quick overview of the additional features utter provides over the built-in printing facilities for Go data types are as follows: The approach utter allows for dumping Go data structures is less flexible than its parent tool. It has just a: This section demonstrates how to quickly get started with utter. See the sections below for further details on formatting and configuration options. To dump a variable with full newlines, indentation, type, and pointer information use Dump, Fdump, or Sdump: Configuration of utter is handled by fields in the ConfigState type. For convenience, all of the top-level functions use a global state available via the utter.Config global. It is also possible to create a ConfigState instance that provides methods equivalent to the top-level functions. This allows concurrent configuration options. See the ConfigState documentation for more details. The following configuration options are available: Indent String to use for each indentation level for Dump functions. It is a single space by default. A popular alternative is "\t". NumericWidth NumericWidth specifies the number of columns to use when dumping a numeric slice or array (including bool). Zero specifies all entries on one line. StringWidth StringWidth specifies the number of columns to use when dumping a string slice or array. Zero specifies all entries on one line. BytesWidth Number of byte columns to use when dumping byte slices and arrays. CommentBytes Specifies whether ASCII comment annotations are attached to byte slice and array dumps. CommentPointers CommentPointers specifies whether pointer information will be added as comments. IgnoreUnexported Specifies that unexported fields should be ignored. ElideType ElideType specifies that type information defined by context should not be printed in a dump. SortKeys Specifies map keys should be sorted before being printed. Use this to have a more deterministic, diffable output. Note that only native types (bool, int, uint, floats, uintptr and string) are supported with other types sorted according to the reflect.Value.String() output which guarantees display stability. Natural map order is used by default. Simply call utter.Dump with a list of variables you want to dump: You may also call utter.Fdump if you would prefer to output to an arbitrary io.Writer. For example, to dump to standard error: A third option is to call utter.Sdump to get the formatted output as a string: See the Dump example for details on the setup of the types and variables being shown here. Byte (and uint8) arrays and slices are displayed uniquely, similar to the hexdump -C command as shown.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/kortschak/utter
License: ISC
Latest release: about 1 year ago
First release: about 5 years ago
Namespace: github.com/kortschak
Dependent packages: 85
Dependent repositories: 2,174
Stars: 63 on GitHub
Forks: 2 on GitHub
Docker dependents: 14
Docker downloads: 9,749
See more repository details: repos.ecosyste.ms
Funding links: https://github.com/sponsors/kortschak
Last synced: about 1 month ago

    Loading...
    Readme
    Loading...