pkg

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package pkg contains reusable Go libraries for omni, importable by external projects.

Directories

Path Synopsis
buf
internal/app
Package app provides application primitives.
Package app provides application primitives.
internal/app/appcmd
Package appcmd contains helper functionality for applications using commands.
Package appcmd contains helper functionality for applications using commands.
internal/app/appcmd/appcmdtesting
Package appcmdtesting contains test utilities for appcmd.
Package appcmdtesting contains test utilities for appcmd.
internal/app/appext
Package appext contains extra functionality to work with config files and flags.
Package appext contains extra functionality to work with config files and flags.
internal/buf/bufgen
Package bufgen does configuration-based generation.
Package bufgen does configuration-based generation.
internal/buf/buflsp
Package buflsp implements a language server for Protobuf.
Package buflsp implements a language server for Protobuf.
internal/buf/bufprotoc
Package bufprotoc builds ModuleSets for protoc include paths and file paths.
Package bufprotoc builds ModuleSets for protoc include paths and file paths.
internal/buf/bufprotopluginexec
Package bufprotopluginexec provides protoc plugin handling and execution.
Package bufprotopluginexec provides protoc plugin handling and execution.
internal/bufpkg/bufconnect
Package bufconnect provides buf-specific Connect functionality.
Package bufconnect provides buf-specific Connect functionality.
internal/bufpkg/bufprotoplugin
Package bufprotoplugin contains helper functionality for protoc plugins.
Package bufprotoplugin contains helper functionality for protoc plugins.
internal/bufpkg/bufprotoplugin/bufprotopluginos
Package bufprotopluginos does OS-specific generation.
Package bufprotopluginos does OS-specific generation.
internal/bufpkg/bufprotosource
Package bufprotosource defines minimal interfaces for Protobuf descriptor types.
Package bufprotosource defines minimal interfaces for Protobuf descriptor types.
internal/bufpkg/bufremoteplugin/bufremotepluginconfig
Package bufremotepluginconfig defines the buf.plugin.yaml file.
Package bufremotepluginconfig defines the buf.plugin.yaml file.
internal/bufpkg/bufremoteplugin/bufremoteplugindocker
Package bufremoteplugindocker contains utilities for building Buf plugins using the Docker API.
Package bufremoteplugindocker contains utilities for building Buf plugins using the Docker API.
internal/gen/data/datawkt
Package datawkt stores the sources of the Well-Known Types, and provides helper functionality around them.
Package datawkt stores the sources of the Well-Known Types, and provides helper functionality around them.
internal/interrupt
Package interrupt implements handling for interrupt signals.
Package interrupt implements handling for interrupt signals.
internal/pkg/diff
Package diff implements diffing.
Package diff implements diffing.
internal/pkg/encoding
Package encoding provides encoding utilities.
Package encoding provides encoding utilities.
internal/pkg/github/githubtesting
Package githubtesting provides testing functionality for GitHub.
Package githubtesting provides testing functionality for GitHub.
internal/pkg/indent
Package indent handles printing with indentation, mostly for debug purposes.
Package indent handles printing with indentation, mostly for debug purposes.
internal/pkg/licenseheader
Package licenseheader handles license headers.
Package licenseheader handles license headers.
internal/pkg/netrc
Package netrc contains functionality to work with netrc.
Package netrc contains functionality to work with netrc.
internal/pkg/normalpath
Package normalpath provides functions similar to filepath.
Package normalpath provides functions similar to filepath.
internal/pkg/oauth2
Package oauth2 contains functionality to work with OAuth2.
Package oauth2 contains functionality to work with OAuth2.
internal/pkg/osext
Package osext provides os utilities.
Package osext provides os utilities.
internal/pkg/protogenutil
Package protogenutil provides support for protoc plugin development with the protoplugin and protogen packages.
Package protogenutil provides support for protoc plugin development with the protoplugin and protogen packages.
internal/pkg/refcount
Package refcount provides utilities for working with reference-counted objects.
Package refcount provides utilities for working with reference-counted objects.
internal/pkg/shake256
Package shake256 provides simple utilities around shake256 digests.
Package shake256 provides simple utilities around shake256 digests.
internal/pkg/slogapp
Package slogapp builds slog.Loggers.
Package slogapp builds slog.Loggers.
internal/pkg/slogtestext
Package slogtestext provides Loggers for testing.
Package slogtestext provides Loggers for testing.
internal/pkg/storage
Package storage implements a simple storage abstraction.
Package storage implements a simple storage abstraction.
internal/pkg/storage/storagearchive
Package storagearchive implements archive utilities.
Package storagearchive implements archive utilities.
internal/pkg/storage/storagemem
Package storagemem implements an in-memory storage Bucket.
Package storagemem implements an in-memory storage Bucket.
internal/pkg/storage/storagemem/internal
Package internal splits out ImmutableObject into a separate package from storagemem to make it impossible to modify ImmutableObject via direct field access.
Package internal splits out ImmutableObject into a separate package from storagemem to make it impossible to modify ImmutableObject via direct field access.
internal/pkg/storage/storageos
Package storageos implements an os-backed storage Bucket.
Package storageos implements an os-backed storage Bucket.
internal/pkg/storage/storagetesting
Package storagetesting implements testing utilities and integration tests for storage.
Package storagetesting implements testing utilities and integration tests for storage.
internal/pkg/storage/storageutil
Package storageutil provides helpers for storage implementations.
Package storageutil provides helpers for storage implementations.
internal/pkg/syserror
Package syserror handles "system errors".
Package syserror handles "system errors".
internal/pkg/tmp
Package tmp provides temporary files and directories.
Package tmp provides temporary files and directories.
internal/pkg/wasm
Package wasm provides a Wasm runtime for plugins.
Package wasm provides a Wasm runtime for plugins.
internal/protocompile
Package protocompile provides the entry point for a high performance native Go protobuf compiler.
Package protocompile provides the entry point for a high performance native Go protobuf compiler.
internal/protocompile/ast
Package ast defines types for modeling the AST (Abstract Syntax Tree) for the Protocol Buffers interface definition language.
Package ast defines types for modeling the AST (Abstract Syntax Tree) for the Protocol Buffers interface definition language.
internal/protocompile/experimental/ast
Package ast is a high-performance implementation of a Protobuf IDL abstract syntax tree.
Package ast is a high-performance implementation of a Protobuf IDL abstract syntax tree.
internal/protocompile/experimental/ast/predeclared
Package predeclared provides all of the identifiers with a special meaning in Protobuf.
Package predeclared provides all of the identifiers with a special meaning in Protobuf.
internal/protocompile/experimental/ast/syntax
Package syntax specifies all of the syntax pragmas (including editions) that Protocompile understands.
Package syntax specifies all of the syntax pragmas (including editions) that Protocompile understands.
internal/protocompile/experimental/dom
Package dom is a Go port of https://github.com/mcy/strings/tree/main/allman, a high-performance meta-formatting library.
Package dom is a Go port of https://github.com/mcy/strings/tree/main/allman, a high-performance meta-formatting library.
internal/protocompile/experimental/expr
Package expr provides an abstract syntax tree implementation for an expression language shared by various parts of the compiler.
Package expr provides an abstract syntax tree implementation for an expression language shared by various parts of the compiler.
internal/protocompile/experimental/id
Package id provides helpers for working with node-oriented data structures (such as ASTs and graphs) using compressed pointers (IDs).
Package id provides helpers for working with node-oriented data structures (such as ASTs and graphs) using compressed pointers (IDs).
internal/protocompile/experimental/incremental
Package incremental implements a query-oriented incremental compilation framework.
Package incremental implements a query-oriented incremental compilation framework.
internal/protocompile/experimental/incremental/queries
Package queries provides specific incremental.Query types for various parts of Protocompile.
Package queries provides specific incremental.Query types for various parts of Protocompile.
internal/protocompile/experimental/internal/cycle
Package cycle contains internal helpers for dealing with dependency cycles.
Package cycle contains internal helpers for dealing with dependency cycles.
internal/protocompile/experimental/internal/erredition
Package erredition defines common diagnostics for issuing errors about the wrong edition being used.
Package erredition defines common diagnostics for issuing errors about the wrong edition being used.
internal/protocompile/experimental/internal/errtoken
Package errtoken contains standard diagnostics involving tokens, usually emitted by the lexer.
Package errtoken contains standard diagnostics involving tokens, usually emitted by the lexer.
internal/protocompile/experimental/internal/just
package just adds a "justification" helper for diagnostics.
package just adds a "justification" helper for diagnostics.
internal/protocompile/experimental/internal/taxa
Package taxa (plural of taxon, an element of a taxonomy) provides support for classifying Protobuf syntax productions for use in the parser and in diagnostics.
Package taxa (plural of taxon, an element of a taxonomy) provides support for classifying Protobuf syntax productions for use in the parser and in diagnostics.
internal/protocompile/experimental/internal/tokenmeta
Package meta defines internal metadata types shared between the token package and the lexer.
Package meta defines internal metadata types shared between the token package and the lexer.
internal/protocompile/experimental/ir
Package ir defines the intermediate representation used by Protocompile.
Package ir defines the intermediate representation used by Protocompile.
internal/protocompile/experimental/ir/presence
Package presence provides Kind, which denotes the way in which a field can be present in a Protobuf message.
Package presence provides Kind, which denotes the way in which a field can be present in a Protobuf message.
internal/protocompile/experimental/report
Package report provides a robust diagnostics framework.
Package report provides a robust diagnostics framework.
internal/protocompile/experimental/report/tags
Package tags defines publicly-exposed diagnostic tag constants for use with [report.Tag].
Package tags defines publicly-exposed diagnostic tag constants for use with [report.Tag].
internal/protocompile/experimental/seq
Package seq provides an interface for sequence-like types that can be indexed and inserted into.
Package seq provides an interface for sequence-like types that can be indexed and inserted into.
internal/protocompile/experimental/source
Package source provides a standard interfaces for working with source files and spans within them.
Package source provides a standard interfaces for working with source files and spans within them.
internal/protocompile/experimental/source/length
Package length provides various length that can be used for configuring the behavior of line/column calculations.
Package length provides various length that can be used for configuring the behavior of line/column calculations.
internal/protocompile/experimental/token
Package token provides a memory-efficient representation of a token tree stream for the Protobuf IDL.
Package token provides a memory-efficient representation of a token tree stream for the Protobuf IDL.
internal/protocompile/experimental/token/keyword
Package keyword provides Keyword, an enum of all special "grammar particles" (i.e., literal tokens with special meaning in the grammar such as identifier keywords and punctuation) recognized by Protocompile.
Package keyword provides Keyword, an enum of all special "grammar particles" (i.e., literal tokens with special meaning in the grammar such as identifier keywords and punctuation) recognized by Protocompile.
internal/protocompile/internal/arena
Package arena defines an Arena type with compressed pointers.
Package arena defines an Arena type with compressed pointers.
internal/protocompile/internal/cases
Package cases provides functions for inter-converting between different case styles.
Package cases provides functions for inter-converting between different case styles.
internal/protocompile/internal/editions
Package editions contains helpers related to resolving features for Protobuf editions.
Package editions contains helpers related to resolving features for Protobuf editions.
internal/protocompile/internal/enum command
enum is a helper for generating boilerplate related to Go enums.
enum is a helper for generating boilerplate related to Go enums.
internal/protocompile/internal/ext/bitsx
Package bitsx contains extensions to Go's package math/bits.
Package bitsx contains extensions to Go's package math/bits.
internal/protocompile/internal/ext/cmpx
package cmpx contains extensions to Go's package cmp.
package cmpx contains extensions to Go's package cmp.
internal/protocompile/internal/ext/iterx
Package iterx contains extensions to Go's package iter.
Package iterx contains extensions to Go's package iter.
internal/protocompile/internal/ext/mapsx
package mapsx contains extensions to Go's package maps.
package mapsx contains extensions to Go's package maps.
internal/protocompile/internal/ext/osx
Package osx contains extensions to the os package.
Package osx contains extensions to the os package.
internal/protocompile/internal/ext/slicesx
Package slicesx contains extensions to Go's package slices.
Package slicesx contains extensions to Go's package slices.
internal/protocompile/internal/ext/stringsx
Package stringsx contains extensions to Go's package strings.
Package stringsx contains extensions to Go's package strings.
internal/protocompile/internal/ext/unsafex
Package unsafex contains extensions to Go's package unsafe.
Package unsafex contains extensions to Go's package unsafe.
internal/protocompile/internal/featuresext
Package featuresext provides file descriptors for the "google/protobuf/cpp_features.proto" and "google/protobuf/java_features.proto" standard import files.
Package featuresext provides file descriptors for the "google/protobuf/cpp_features.proto" and "google/protobuf/java_features.proto" standard import files.
internal/protocompile/internal/golden
Package golden provides a framework for writing file-based golden tests.
Package golden provides a framework for writing file-based golden tests.
internal/protocompile/internal/intern
Package intern provides an interning table abstraction to optimize symbol resolution.
Package intern provides an interning table abstraction to optimize symbol resolution.
internal/protocompile/internal/testing/dualcompiler
Package dualcompiler provides a test abstraction layer for running tests with both the old protocompile.Compiler and the new experimental compiler.
Package dualcompiler provides a test abstraction layer for running tests with both the old protocompile.Compiler and the new experimental compiler.
internal/protocompile/internal/toposort
Package toposort provides a generic topological sort implementation.
Package toposort provides a generic topological sort implementation.
internal/protocompile/linker
Package linker contains logic and APIs related to linking a protobuf file.
Package linker contains logic and APIs related to linking a protobuf file.
internal/protocompile/options
Package options contains the logic for interpreting options.
Package options contains the logic for interpreting options.
internal/protocompile/parser
Package parser contains the logic for parsing protobuf source code into an AST (abstract syntax tree) and also for converting an AST into a descriptor proto.
Package parser contains the logic for parsing protobuf source code into an AST (abstract syntax tree) and also for converting an AST into a descriptor proto.
internal/protocompile/protoutil
Package protoutil contains useful functions for interacting with descriptors.
Package protoutil contains useful functions for interacting with descriptors.
internal/protocompile/reporter
Package reporter contains the types used for reporting errors from protocompile operations.
Package reporter contains the types used for reporting errors from protocompile operations.
internal/protocompile/sourceinfo
Package sourceinfo contains the logic for computing source code info for a file descriptor.
Package sourceinfo contains the logic for computing source code info for a file descriptor.
internal/protocompile/walk
Package walk provides helper functions for traversing all elements in a protobuf file descriptor.
Package walk provides helper functions for traversing all elements in a protobuf file descriptor.
internal/protocompile/wellknownimports
Package wellknownimports provides source code for the well-known import files for use with a protocompile.Compiler.
Package wellknownimports provides source code for the well-known import files for use with a protocompile.Compiler.
internal/protoplugin
Package protoplugin is a simple library to assist in writing protoc plugins.
Package protoplugin is a simple library to assist in writing protoc plugins.
internal/protoplugin/internal/examples/protoc-gen-protogen-simple command
Package main implements a very simple plugin that scaffolds using the protogen package with the protoplugin package.
Package main implements a very simple plugin that scaffolds using the protogen package with the protoplugin package.
internal/protoplugin/internal/examples/protoc-gen-protoreflect-simple command
Package main implements a very simple plugin that just outputs text files with the names of the top-level messages in each file, but uses the protoreflect package instead of directly using the FileDescriptorProtos.
Package main implements a very simple plugin that just outputs text files with the names of the top-level messages in each file, but uses the protoreflect package instead of directly using the FileDescriptorProtos.
internal/protoplugin/internal/examples/protoc-gen-simple command
Package main implements a very simple plugin that just outputs text files with the names of the top-level messages in each file.
Package main implements a very simple plugin that just outputs text files with the names of the top-level messages in each file.
internal/standard/xio
Package xio provides extended functionality for io.
Package xio provides extended functionality for io.
internal/standard/xlog/xslog
Package xslog provides extended functionality for slog.
Package xslog provides extended functionality for slog.
internal/standard/xos/xexec
Package xexec provides extended functionality for exec.
Package xexec provides extended functionality for exec.
internal/standard/xpath/xfilepath
Package xfilepath provides extended functionality for filepath.
Package xfilepath provides extended functionality for filepath.
internal/standard/xslices
Package xslices provides extended functionality for slices.
Package xslices provides extended functionality for slices.
internal/standard/xstrings
Package xstrings provides extended functionality for strings.
Package xstrings provides extended functionality for strings.
internal/standard/xsync
Package xsync provides extended functionality for sync.
Package xsync provides extended functionality for sync.
internal/standard/xtesting
Package xtesting provides extended functionality for testing.
Package xtesting provides extended functionality for testing.
Package cryptutil provides AES-256-GCM symmetric encryption and decryption with PBKDF2 key derivation.
Package cryptutil provides AES-256-GCM symmetric encryption and decryption with PBKDF2 key derivation.
Package cssfmt provides CSS formatting, minification, and validation.
Package cssfmt provides CSS formatting, minification, and validation.
Package encoding provides Base64, Base32, and Base58 encoding and decoding functions, plus a WrapString helper for line wrapping encoded output at a specified column width.
Package encoding provides Base64, Base32, and Base58 encoding and decoding functions, plus a WrapString helper for line wrapping encoded output at a specified column width.
Package figlet provides a FIGlet font parser and ASCII art text renderer.
Package figlet provides a FIGlet font parser and ASCII art text renderer.
Package hashutil provides hash computation for files, strings, byte slices, and io.Reader streams.
Package hashutil provides hash computation for files, strings, byte slices, and io.Reader streams.
Package htmlfmt provides HTML formatting, minification, and validation.
Package htmlfmt provides HTML formatting, minification, and validation.
Package idgen provides unique identifier generation including UUID v4/v7, ULID, KSUID, Nanoid, and Snowflake IDs.
Package idgen provides unique identifier generation including UUID v4/v7, ULID, KSUID, Nanoid, and Snowflake IDs.
Package jsonutil provides a jq-style JSON query engine.
Package jsonutil provides a jq-style JSON query engine.
Package pipeline provides a streaming text processing engine with built-in transform stages connected via io.Pipe goroutines.
Package pipeline provides a streaming text processing engine with built-in transform stages connected via io.Pipe goroutines.
Package search provides text search engines including grep-style pattern matching and ripgrep-compatible file searching.
Package search provides text search engines including grep-style pattern matching and ripgrep-compatible file searching.
grep
Package grep provides pattern-based search over string slices.
Package grep provides pattern-based search over string slices.
rg
Package rg provides gitignore pattern parsing and matching, file type extension filtering, glob matching, and binary file detection.
Package rg provides gitignore pattern parsing and matching, file type extension filtering, glob matching, and binary file detection.
Package sqlfmt provides SQL formatting, minification, validation, and tokenization.
Package sqlfmt provides SQL formatting, minification, validation, and tokenization.
Package textutil provides text processing functions including sorting, deduplication, and trimming of string slices.
Package textutil provides text processing functions including sorting, deduplication, and trimming of string slices.
diff
Package diff provides line-based diff computation using the LCS algorithm, unified format output, and JSON structure comparison.
Package diff provides line-based diff computation using the LCS algorithm, unified format output, and JSON structure comparison.
Package twig provides directory tree scanning, formatting, and comparison with support for parallel scanning, streaming output, and JSON snapshot comparison for detecting added, removed, modified, and moved files.
Package twig provides directory tree scanning, formatting, and comparison with support for parallel scanning, streaming output, and JSON snapshot comparison for detecting added, removed, modified, and moved files.
builder
Package builder constructs tree node hierarchies from flat scan results, assembling parent-child relationships for display formatting.
Package builder constructs tree node hierarchies from flat scan results, assembling parent-child relationships for display formatting.
comparer
Package comparer provides JSON tree snapshot comparison using a 5-phase algorithm to detect added, removed, modified, and moved files between two directory snapshots.
Package comparer provides JSON tree snapshot comparison using a 5-phase algorithm to detect added, removed, modified, and moved files between two directory snapshots.
expander
Package expander provides tree node expansion for unfolding collapsed directory structures into their full hierarchical representation.
Package expander provides tree node expansion for unfolding collapsed directory structures into their full hierarchical representation.
formatter
Package formatter provides tree output formatting including ASCII tree, JSON, flattened hash, and NDJSON streaming modes.
Package formatter provides tree output formatting including ASCII tree, JSON, flattened hash, and NDJSON streaming modes.
models
Package models defines shared data structures for tree nodes, scan results, and formatting options used across the twig sub-packages.
Package models defines shared data structures for tree nodes, scan results, and formatting options used across the twig sub-packages.
parser
Package parser reads JSON tree snapshots and reconstructs the in-memory tree representation for comparison and display operations.
Package parser reads JSON tree snapshots and reconstructs the in-memory tree representation for comparison and display operations.
scanner
Package scanner provides parallel directory scanning with configurable limits for maximum files, hash size thresholds, and worker count.
Package scanner provides parallel directory scanning with configurable limits for maximum files, hash size thresholds, and worker count.
Package video provides a pure Go video download engine supporting YouTube and other video platforms.
Package video provides a pure Go video download engine supporting YouTube and other video platforms.
cache
Package cache provides a filesystem-based cache using XDG directory conventions for storing and retrieving JSON-serialized data across video download sessions.
Package cache provides a filesystem-based cache using XDG directory conventions for storing and retrieving JSON-serialized data across video download sessions.
downloader
Package downloader provides video download engines for HTTP/HTTPS and HLS (M3U8) protocols with resume, retry, rate limiting, and progress tracking support.
Package downloader provides video download engines for HTTP/HTTPS and HLS (M3U8) protocols with resume, retry, rate limiting, and progress tracking support.
extractor
Package extractor defines the Extractor interface and provides a global registry for site-specific video metadata extractors.
Package extractor defines the Extractor interface and provides a global registry for site-specific video metadata extractors.
extractor/all
Package all imports all extractor packages to register them.
Package all imports all extractor packages to register them.
format
Package format provides video format sorting by quality and a selector that parses format specification strings like "best", "worst", "bestvideo", and filter expressions like "best[height<=720]".
Package format provides video format sorting by quality and a selector that parses format specification strings like "best", "worst", "bestvideo", and filter expressions like "best[height<=720]".
jsinterp
Package jsinterp provides a JavaScript execution environment using the goja runtime for decrypting YouTube video signatures and throttling parameters (nsig).
Package jsinterp provides a JavaScript execution environment using the goja runtime for decrypting YouTube video signatures and throttling parameters (nsig).
m3u8
Package m3u8 provides an HLS manifest parser that handles both master and media playlists, including segment durations, encryption keys (EXT-X-KEY), and variant stream selection.
Package m3u8 provides an HLS manifest parser that handles both master and media playlists, including segment durations, encryption keys (EXT-X-KEY), and variant stream selection.
nethttp
Package nethttp provides an HTTP client wrapper with cookie jar support, proxy configuration, custom headers, user-agent, and automatic retries for the video download engine.
Package nethttp provides an HTTP client wrapper with cookie jar support, proxy configuration, custom headers, user-agent, and automatic retries for the video download engine.
types
Package types defines shared data structures for the video download engine including VideoInfo, Format, Fragment, Thumbnail, Subtitle, Chapter, and error types.
Package types defines shared data structures for the video download engine including VideoInfo, Format, Fragment, Thumbnail, Subtitle, Chapter, and error types.
utils
Package utils provides shared utility functions for the video download engine including filename sanitization, HTML metadata extraction, URL manipulation, duration/filesize parsing, and nested JSON traversal.
Package utils provides shared utility functions for the video download engine including filename sanitization, HTML metadata extraction, URL manipulation, duration/filesize parsing, and nested JSON traversal.

Jump to

Keyboard shortcuts

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