Oops is a Go library for structured error handling that serves as a drop-in replacement for the standard error type. It provides a fluent builder pattern to attach rich contextual information (error codes, domains, tags, key-value attributes, user/tenant data, HTTP request/response, timestamps, durations, hints, ownership) to errors, along with automatic stack trace capture and optional source code fragment extraction. The library implements the standard error interface, supports error wrapping and chaining, panic recovery, assertions, and integrates with major Go logging libraries (zap, zerolog, logrus, slog) via separate formatter packages. Its architecture centers on an immutable option chain (functional options) that defers stack frame symbolization to first read, minimizing allocation overhead for errors that are created but never inspected. Key entry points are the package-level functions (Wrap, Wrapf, New, Errorf, Join, Recover, Recoverf, Assert, Assertf) and the OopsErrorBuilder chainable methods. External dependencies are minimal: only github.com/oklog/ulid/v2, github.com/samber/lo, and go.opentelemetry.io/otel/trace for optional OpenTelemetry span context extraction. The codebase is well-tested, benchmarked, and follows Go best practices with comprehensive linting and security scanning.
Telebot is a comprehensive Go framework for building Telegram bots that provides a clean abstraction over the Telegram Bot API. It features a robust middleware system, flexible context handling for update processing, and innovative patterns like the Sendable interface that enables transparent file handling. The framework supports both long polling and webhook approaches for receiving updates, and includes comprehensive support for Telegram features including payments, inline queries, callbacks, and business accounts. The architecture emphasizes separation of concerns with distinct components for bot core functionality, message types, media handling, and update routing. Notable design patterns include the Context interface that encapsulates update data and action capabilities, the Sendable interface that allows types to define their own sending behavior, and a dual API pattern for options that combines convenience flags with comprehensive options structs.
This repository provides TransmittableThreadLocal (TTL), a Java library that extends InheritableThreadLocal to propagate thread-local values across threads even when using thread pools, executors, ForkJoinPool, and other asynchronous constructs. It solves the common problem of context loss (e.g., tracing, security, session) in asynchronous Java applications. The library offers three usage modes: manual wrapping of Runnable/Callable via TtlRunnable/TtlCallable, wrapping executors via TtlExecutors, and transparent bytecode transformation via a Java Agent (TtlAgent) that automatically instruments JDK thread pool classes. The architecture is modular: ttl-core contains the core API and CRR (Capture-Replay-Restore) pattern, ttl-agent provides the agent with Javassist-based transformlets, ttl-kotlin adds Kotlin extensions, and ttl-integrations includes Vert.x 3/4 support. A ttl2-compatible module maintains backward compatibility with the v2 API. The library is widely adopted in the Java ecosystem (e.g., Apache ShardingSphere, SOFARPC) and is under active development with a v3 branch introducing a refined API. While primarily a library, it includes a Java Agent component that operates at the JVM level, making it a hybrid of library and instrumentation tool.
kubectl-foreach is a Go-based CLI tool designed to run kubectl commands against multiple Kubernetes contexts in parallel. It retrieves context lists from kubeconfig, applies user-defined filters (exact match, regex, exclusion) to select target contexts, executes the provided kubectl command concurrently for each context, and prefixes output lines with context names for clarity. The architecture is monolithic with clear separation of concerns: argument parsing, filtering, context matching, and parallel execution are isolated into distinct modules. Key dependencies include kubectl (for context retrieval and command execution) and third-party libraries for colored output (gchalk), testing (testify), and concurrency management (golang.org/x/sync).
This is a React library for feature toggle management, providing components and higher-order components to conditionally render UI based on enabled features. The library exposes a `FeatureToggles` provider, a `Feature` consumer component (with render prop or component swapping), a `configureFeature` curried HOC for creating pre-configured feature components, a `withFeatures` HOC to inject the features list, and a `useFeatures` hook for functional components. The code is well-structured, thoroughly tested, and follows a clean context-based architecture. However, the repository is clearly unmaintained: it targets Node 8, uses outdated Babel 6 presets, React 16, and has no dependency updates in years. The technical drift is high, making it risky for new projects without significant modernization. Despite this, the core patterns remain valid and could be extracted or used as a reference for implementing feature toggles in modern React.