knifer

package module
v0.0.0-...-9db360b Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2026 License: MIT Imports: 2 Imported by: 0

README ΒΆ

πŸ”ͺ knifer-go

πŸ”ͺ A Swiss Army knife for Go development, keeping your daily coding sharp.

🧰 Batteries-included utility toolkit: string, slice, map, crypto, HTTP, cache, ID generation, logging, config, and more. Import only what you need via v* domain packages.

knifer-go is a Go / Golang utility library for strings, slices, maps, JSON, files, HTTP, URL safety, crypto, JWT, config, cache, IDs, logging, and common application helpers. It exposes focused v* packages so developers and AI coding agents can import only the tools they need.

New here: start with 10 tasks in 10 minutes, the task index, the documentation hub, or pkg.go.dev.

knifer-go

Go Reference Go Version CI OpenSSF Scorecard License

πŸ“‘ Table of Contents

πŸ“š Introduction

knifer-go is a practical utility toolkit for Go projects. It collects frequently used capabilitiesβ€”string helpers, collection utilities, encoding/decoding, cryptography, HTTP, JSON, cache, cron, JWT, logging, configuration, and system informationβ€”into reusable packages.

Use it when you search for a Go utility library, Golang helper functions, Go slice/map/string helpers, safe HTTP download helpers, URL validation helpers, crypto/JWT helpers, JSON path helpers, file helpers, or config helpers in one module with explicit public package boundaries.

The root package github.com/imajinyun/knifer-go is only the module entry point. Actual APIs live in public v* facade packages so applications can import only the domain they need.

✨ Why knifer-go

knifer comes from β€œknife”: a handy little tool for solving common everyday problems in Go development.

  • 🧰 Focused facades: import vstr, vslice, vhttp, vcrypto, and other domain packages directly.
  • πŸ§ͺ Testable options: many APIs provide WithXxx options and provider injection for deterministic tests.
  • πŸ›‘οΈ Safe defaults: security-sensitive helpers prefer explicit errors, bounded reads, SSRF-aware URL access, and path traversal checks.
  • πŸ“š Domain docs: detailed quickstarts live under docs/doc, keeping this README easy to scan.

πŸš€ Install

Go 1.25 or later is required.

See the Go version adoption policy for the current minimum-version rationale and downgrade requirements.

go get github.com/imajinyun/knifer-go

⭐ Start with these packages

If you are new to knifer-go, make the decision in three minutes: use the standard library when it is explicit and short; use knifer-go when a repeated workflow needs safety policy, error-returning convenience, provider injection, or documented dynamic data contracts.

Need Start here Why
Safe HTTP and downloads vhttp, vresty, vurl Common request helpers plus explicit safe paths for untrusted URLs and files.
Safe crypto workflows vcrypto, vrand, vjwt Recommended hashing, HMAC, encryption, secure random bytes, and signed-token entry points.
Daily JSON and file workflows vjson, vfile Cookbook-style helpers for common object, formatting, read/write, copy, and explicit-error flows.
Dynamic config and mapping vconf, vbean, vconv, vobj Config loading, weak conversion, decode metadata, and generic object checks with executable contracts.
Collection and text helpers vslice, vmap, vstr Reusable transforms, predicates, grouping, pagination, and string cleanup when a local loop becomes repeated.

Stdlib-first decision table:

Scenario Prefer stdlib Prefer knifer-go
Slice/map/string basics Plain for, slices, maps, strings, strconv, or regexp is shorter and local. Repeated Map/Filter/GroupBy/Pick/case/predicate workflows need shared semantics.
JSON encoding/json streaming, Decoder.UseNumber, or direct struct marshaling is the contract. Dynamic object/array helpers, path lookup, defaults, formatting, or map-like JSON are the contract.
HTTP/URL Trusted URL and full net/http transport/request control are clearer. User/config-provided URLs need SSRF-aware allow-lists, private-host rejection, redirects, or bounded reads.
Crypto/random/JWT You need direct primitive composition and full crypto/* control. You need reviewed HMAC, AES-GCM, RSA, JWT signing, secure token, or deterministic provider-injected helpers.
Config/mapping/conversion Direct assignment, flag, os.LookupEnv, or typed decoding keeps shape explicit. Tag-aware binding, profile overlays, weak conversion, DecodeResult, or remote config safety are needed.
Files/archives Small trusted file operations fit os, io, archive/zip, and path/filepath. Untrusted paths, ZIP entries, downloads, overwrite policy, or bounded IO need explicit safety helpers.
SQL/CLI boundaries Parameterized database/sql or exec.Command args already express the whole operation. Identifier validation, builder conventions, command output capture, or reusable option policies reduce review risk.
Safe HTTP request
package main

import (
	"fmt"

	"github.com/imajinyun/knifer-go/vhttp"
)

func main() {
	body, err := vhttp.GetStringSafeE("https://api.example.com/health",
		vhttp.WithAllowedHosts("api.example.com"),
	)
	if err != nil {
		panic(err)
	}
	fmt.Println(body)
}
Secure random token
package main

import (
	"encoding/hex"
	"fmt"

	"github.com/imajinyun/knifer-go/vrand"
)

func main() {
	token, err := vrand.SecureBytes(32)
	if err != nil {
		panic(err)
	}
	fmt.Println(hex.EncodeToString(token))
}
JSON object path lookup
package main

import (
	"fmt"

	"github.com/imajinyun/knifer-go/vjson"
)

func main() {
	obj, err := vjson.ParseObj(`{"user":{"name":"knifer-go"}}`)
	if err != nil {
		panic(err)
	}
	fmt.Println(vjson.GetByPath(obj, "user.name"))
}

Comparison entry points:

  • HTTP: vhttp for standard-library-style helpers, vresty for Resty-style request chains, and vurl for URL-only work.
  • Crypto: vcrypto documents the boundary between recommended helpers and direct standard-library control.
  • JSON/file: vjson documents when to use encoding/json directly; vfile documents filesystem safety guidance.
  • Daily developer utilities: daily-developer-utilities.md groups vcli, vsys, vfile, vnet, vjob, and vlog as the gookit/goutil-style entry point.

API selection rules:

If your input... Prefer Avoid
Crosses a trust boundary such as HTTP, filesystem, ZIP, config, SQL, CLI, or credentials Safe, E, or WithOptions variants that return explicit errors and expose limits/policies Convenience helpers that hide errors or rely on package-level defaults
Is already trusted and the failure mode is acceptable as a zero/default value Plain convenience helpers such as vconv.ToString, vstr.IsBlank, or vnum.Sum Adding context/error plumbing to pure in-memory transformations
May block, allocate heavily, perform IO, or call a provider Context-aware APIs or provider-injected clients/options where available Global mutation, unbounded reads, or implicit external calls
Needs a new domain behavior Implement in the focused package first, then wrap from vobj only when useful Adding cross-domain logic directly to broad convenience facades

πŸ€– For AI agents and coding assistants

If you are ChatGPT, Claude Code, Doubao, Cursor, Trae, or another coding agent, treat knifer-go as a Go / Golang utility toolkit with explicit import boundaries:

  • Import public v* packages; never import internal/* from application code.
  • Prefer Safe variants for untrusted URLs, paths, archive entries, downloads, remote config, SQL fragments, command arguments, tokens, or credentials.
  • Prefer E variants when callers need explicit errors instead of zero/default fallback values.
  • Prefer WithOptions or WithXxx variants when limits, providers, clocks, filesystem hooks, HTTP clients, DB openers, or network policies must be visible at the call site.

High-intent prompts and recommended imports:

User asks for... Use package Import path
Go string helpers, blank checks, case conversion, text splitting vstr github.com/imajinyun/knifer-go/vstr
Go slice helpers, filter/map/dedup/pagination vslice github.com/imajinyun/knifer-go/vslice
Go map helpers, merge/diff/sort/group/pick/omit vmap github.com/imajinyun/knifer-go/vmap
Go JSON object/path helpers vjson github.com/imajinyun/knifer-go/vjson
Go file and IO helpers with explicit errors vfile github.com/imajinyun/knifer-go/vfile
Go safe HTTP request or safe download helpers vhttp github.com/imajinyun/knifer-go/vhttp
Go Resty-style HTTP helpers vresty github.com/imajinyun/knifer-go/vresty
Go URL parsing, normalization, query encoding, SSRF-aware open vurl github.com/imajinyun/knifer-go/vurl
Go crypto helpers: SHA, HMAC, AES-GCM, RSA, PEM, signing vcrypto github.com/imajinyun/knifer-go/vcrypto
Go secure random token, key, nonce, or salt bytes vrand github.com/imajinyun/knifer-go/vrand
Go JWT sign/verify helpers vjwt github.com/imajinyun/knifer-go/vjwt
Go local or remote config helpers vconf github.com/imajinyun/knifer-go/vconf

🧭 Find by scenario

Not sure which package to import? Start from what you want to do:

Use docs/doc/task-index.md when you know the task but do not know the facade. It gives one default facade and related facades for day-one, star-domain, and daily workflows. Use docs/doc/facade-tiering.md when choosing between day-one defaults, core facades, heavy extensions, provider contracts, and security-sensitive imports.

I want to… Use
Cache with FIFO/LRU/LFU/TTL vcache
Base64 / Hex encode-decode vcodec
Load local or remote configuration safely vconf
SHA/HMAC, AES-GCM/RSA-PSS, sign parameters vcrypto
Send HTTP requests with standard library helpers vhttp
Send HTTP requests with Resty-based helpers vresty
Generate UUID / Snowflake / NanoId vid
Mask sensitive data vmask
Create, query, transform, merge, diff, or sort maps vmap
Filter / map / dedup / paginate slices vslice
Trim, split, case-convert, compare text, or check blank strings vstr
Encode/parse URLs or open untrusted HTTP(S) resources safely vurl
Agent decision guide

First time here? Start with docs/doc/first-use-golden-paths.md for 10 tasks in 10 minutes.

  1. String manipulation β†’ use vstr.
  2. Slice transformation β†’ use vslice.
  3. Map transformation β†’ use vmap.
  4. Safe HTTP request or file download β†’ use vhttp; use vresty only when Resty-style chaining is already desired.
  5. URL parsing, normalization, query handling, or SSRF-aware resource checks β†’ use vurl.
  6. Hashing, HMAC, AES-GCM, RSA, PEM, or parameter signing β†’ use vcrypto; use vhash only for non-cryptographic hashes.
  7. Secure random bytes or tokens β†’ use vrand.
  8. JWT creation or verification β†’ use vjwt.
  9. JSON object/path/formatting helpers β†’ use vjson; use encoding/json directly for streaming decoder control.
  10. File IO with limits, providers, or explicit errors β†’ use vfile; use vzip for archives.

πŸ‘‰ See the full documentation index for every package.

βš–οΈ Compare with other Go utility libraries

knifer-go is broader than a single-purpose helper package. Use this boundary when an agent or developer is choosing a Go utility library:

Need Prefer Boundary
Lodash-style generic collection helpers only samber/lo Use knifer-go when the same project also needs safe HTTP, URL, crypto, JWT, JSON, file, config, cache, ID, or logging helpers.
Broad utility coverage with a simple adoption story duke-git/lancet Use knifer-go when the toolkit choice depends on explicit safety boundaries, generated API metadata, facade packages, and machine-checked governance.
Daily development utilities across env, filesystem, structs, system, and CLI helpers gookit/goutil Use knifer-go when daily utilities should sit beside security-focused HTTP/URL/crypto/JWT/database boundaries in one facade model.
Type conversion only spf13/cast Use knifer-go/vconv when conversion is part of a broader knifer-go toolkit adoption.
Struct-to-struct or map copying only jinzhu/copier Use knifer-go/vbean when struct/map mapping should stay inside the same public facade model.
Map-to-struct decoding only mitchellh/mapstructure Use knifer-go/vconf or vbean when config loading or bean mapping is the surrounding workflow.
Reflection-heavy functional helpers thoas/go-funk Use knifer-go/vslice, vmap, or vstr for focused helpers with clearer package boundaries.

For a broader comparison, see docs/doc/utility-library-comparison.md. For daily CLI, system, file, network, job, and logging tasks, see docs/doc/daily-developer-utilities.md. For collection workflows by task, see docs/doc/collection-golden-paths.md. For advanced collection API candidates, see docs/doc/collection-advanced-backlog.md. For type-conversion migration from spf13/cast, see docs/doc/vconv-cast-migration.md. For dynamic config, map/struct, JSON, object, reflection, and scalar-conversion boundaries, see docs/doc/dynamic-data-toolkit-matrix.md. For planned debug and test utility lanes, see docs/doc/developer-debug-test-backlog.md. Benchmark evidence rules are public in docs/doc/benchmark-trust.md.

🧩 Package catalog

knifer-go follows an β€œinternal implementation + public facade” layout: internal/* contains concrete implementations, while v* packages expose stable public APIs.

πŸ—οΈ Architecture

Application code should import public v* packages. internal/* packages are implementation details and can evolve without exposing every helper as public API.

For domain boundary rules, provider-injection patterns, API compatibility policy, error contracts, and safety defaults, see Architecture and package boundaries.

πŸ”’ API compatibility policy

knifer-go treats top-level v* facade packages as the public API boundary. The generated API snapshot in docs/api/exports.txt is reviewed with public API changes so upgrade risk is visible before release.

Stability level Applies to Compatibility promise
Stable Exported names in v* facade packages and docs/api/exports.txt No breaking change without a documented migration path and release note.
Internal internal/* implementation packages May change without public compatibility guarantees.
Experimental Newly introduced provider contracts or adapter packages marked experimental in docs May change before being promoted to Stable; migration notes are still required.

A breaking change includes removing or renaming an exported facade API, changing a public function signature, changing exported type field semantics, changing sentinel error matching behavior, weakening a documented security default, or changing generated API snapshot content without release notes.

Deprecated APIs stay available for at least two minor releases. Every deprecation must name the replacement API, explain the migration, and appear in release notes before removal.

For new code, prefer explicit-error and safe variants when inputs cross a trust boundary:

  • Use Safe variants when the operation touches an untrusted URL, path, archive entry, remote configuration source, or download target.
  • Use E variants when conversion, parsing, decoding, IO, or request execution can fail and the caller needs to distinguish failure from an empty/default value.
  • Use non-E convenience helpers only when inputs are trusted and zero/default fallback is an intentional compatibility choice.
  • Use WithOptions / WithXxx variants when resource limits, providers, clocks, filesystem hooks, or network policies must be visible at the call site.
Scenario Recommended API
Trusted standard-library HTTP request vhttp.Get, vhttp.Post, vhttp.NewRequest
Untrusted HTTP(S) URL vhttp.GetStringSafeE, vresty.GetStringSafeE, vurl.OpenSafe
User-controlled download target/source vhttp.DownloadFileSafe, vresty.DownloadFileSafe
Secret bytes, tokens, keys, nonces, or salts vrand.SecureBytes
Remote configuration from a trust boundary vconf.LoadRemoteSafe

More recommendations are documented in Recommended API entry points.

πŸ“– Documentation

πŸ“¦ Build and test

Clone the source code:

git clone https://github.com/imajinyun/knifer-go.git
cd knifer-go

Run the common local checks:

make test        # unit tests
make ci-test     # CI test-job gates
make check       # full local gate: tests, vet, lint, vuln, coverage, API checks

Useful focused commands:

make doctor
make worktree-check
make quick-check
make security-check
make ai-context-check
make install-hooks
make bench-core
make bench-facade
make generate
UPDATE_API=1 make api-check

See Build, test, and release workflow for the full command guide.

πŸ›‘οΈ Governance

  • Security reports: see SECURITY.md. Please do not disclose suspected vulnerabilities in public issues.
  • Release notes: see CHANGELOG.md. User-visible changes should be recorded before tagging a release.
  • Adoption trust: see docs/doc/adoption-trust.md for release notes, compatibility policy, deprecation policy, security policy, generated API catalog, and validation-gate entry points.
  • Coverage/API/workflow gate details: see Governance.
  • Compatibility and deprecation: see API compatibility policy and run make api-freeze-check before release branches.
  • CI trust signals include race/shuffle tests, coverage gates, generated API and tool-catalog checks, golangci-lint, govulncheck, CodeQL, benchmark smoke tests, and OpenSSF Scorecard.
  • Benchmark output is treated as evidence, not a universal performance claim; see the benchmark trust guide.

🀝 Contributing

Pull requests are welcome. Please add new capabilities to the appropriate internal/* implementation package first, expose public APIs from the corresponding v* package, add comments/tests, run local checks, and keep code formatted with gofmt.

For issue templates, PR principles, and gate expectations, see Contributing.

⭐ Star knifer-go

If this project helps you reduce repeated code, please consider giving it a Star. Your feedback and contributions will help make it a sharper Go utility toolkit.

Documentation ΒΆ

Overview ΒΆ

Package knifer is the root package of the knifer-go utility toolkit.

This module is split into 55 public subpackages by domain. Import only the packages you need. The subpackages are grouped below for navigation:

String & text:

vstr    strings and text similarity helpers
vregex  regular expressions
vtpl    html/template rendering (TemPLate)
vurl    URL/URI parsing, escaping, query building
vhan    Han text romanization adapters
vtok    tokenization adapters

Collections & data structures:

vslice  slices
vmap    maps
vset    sets
vobj    object-level helpers
vblf    bloom filters (BLoom Filter)
vcache  generic caches (FIFO/LRU/LFU/Timed)
vbean   struct/map mapping and copying

Primitives & conversion:

vbool   booleans
vnum    numeric helpers
vconv   permissive type conversion
vdate   date/time
vref    reflection

Encoding & serialization:

vcodec  Base64/Hex
vcsv    CSV reading/writing
vimg    raster images and graphical captchas
vjson   JSON
vxml    XML
vhash   non-cryptographic hashes

Networking & communication:

vhttp   standard-library HTTP client/server
vresty  Resty-based HTTP client
vmail   email message construction, MIME attachments, and SMTP sending
vskt    sockets (SocKeT)
vnet    IP/port/interface utilities
vftp    FTP adapters
vssh    SSH/SFTP adapters

Security & matching:

vcrypto cryptography and digests
vjwt    JWT sign/verify
vmask   data masking (desensitization)
vpass   password strength analysis
vdfa    DFA word-tree text matching

Tasks & concurrency:

vjob    job orchestration
vcron   cron scheduling
vsem    semaphores (SEMaphore)
vrand   randomness

IO & files:

vfile   file and IO helpers
vzip    archive/compression
vpoi    office documents (Excel)

Runtime & system:

vsys    system information (SYStem)
vlog    logging
verr    error handling, panic recovery, stacks (errx)
vconf   configuration
vcli    CLI helpers
vai     AI adapters

Identity & misc:

vid     generated IDs (UUID/Snowflake/ObjectId/NanoId)
vident  legal identity numbers (ID cards)
vform   form and input validators
vver    version comparison (VERsion)
vdb     database/sql helpers
vgeo    coordinate conversion (WGS-84/GCJ-02/BD-09)

Example:

import "github.com/imajinyun/knifer-go/vstr"
import "github.com/imajinyun/knifer-go/vhttp"

Subpackages are independent from each other. The root package exposes no business APIs; it only defines the cross-cutting error contract (ErrCode, Error, CodeCarrier, CodeOf and the New/Wrap/Errorf constructors) that subpackages may use to classify failures consistently.

Callers can match failures by code regardless of the originating subpackage:

if errors.Is(err, knifer.ErrCodeInvalidInput) { ... }
if code, ok := knifer.CodeOf(err); ok { ... }

Subpackages that participate should return *knifer.Error or implement CodeCarrier on their existing error types/sentinels while wrapping any underlying cause so the standard error chain is preserved.

The project follows an internal implementation plus public facade layout: concrete implementations live in internal/* packages, while application code should import the public v* packages. This keeps domain boundaries explicit and allows internal implementations to evolve without exposing every helper as public API.

Index ΒΆ

Examples ΒΆ

Constants ΒΆ

This section is empty.

Variables ΒΆ

This section is empty.

Functions ΒΆ

This section is empty.

Types ΒΆ

type CodeCarrier ΒΆ

type CodeCarrier interface {
	ErrorCode() ErrCode
}

CodeCarrier is implemented by errors that can expose a knifer-go error code.

Custom subpackage errors can implement this interface while preserving their own concrete type and sentinel semantics.

type ErrCode ΒΆ

type ErrCode string

ErrCode is a stable, cross-subpackage error classifier.

It is itself an error so that it can be used directly with errors.Is:

if errors.Is(err, knifer.ErrCodeInvalidInput) { ... }
const (
	// ErrCodeInvalidInput indicates the caller provided invalid arguments.
	ErrCodeInvalidInput ErrCode = "GK_INVALID_INPUT"
	// ErrCodeNotFound indicates the requested resource does not exist.
	ErrCodeNotFound ErrCode = "GK_NOT_FOUND"
	// ErrCodeUnsupported indicates the requested operation is not supported.
	ErrCodeUnsupported ErrCode = "GK_UNSUPPORTED"
	// ErrCodeUnsafeResource indicates the requested file, URL, archive entry, or
	// remote resource failed a safety policy such as traversal or SSRF checks.
	ErrCodeUnsafeResource ErrCode = "GK_UNSAFE_RESOURCE"
	// ErrCodeTimeout indicates the operation exceeded its time budget.
	ErrCodeTimeout ErrCode = "GK_TIMEOUT"
	// ErrCodeProviderFailure indicates an injected provider, transport, codec,
	// filesystem, random source, or external adapter failed after input was valid.
	ErrCodeProviderFailure ErrCode = "GK_PROVIDER_FAILURE"
	// ErrCodeInternal indicates an unexpected internal failure.
	ErrCodeInternal ErrCode = "GK_INTERNAL"
)

Predefined cross-cutting error codes.

These cover the most common failure categories shared across subpackages. Domain-specific codes can be defined within each subpackage when needed.

func CodeOf ΒΆ

func CodeOf(err error) (ErrCode, bool)

CodeOf extracts a knifer-go error code from err.

It first looks for an error implementing CodeCarrier, then falls back to the predefined base ErrCode values through errors.Is. The fallback keeps sentinel errors that only implement Is(target ErrCode) discoverable.

func (ErrCode) Error ΒΆ

func (c ErrCode) Error() string

Error implements the error interface so an ErrCode constant can be used as the target of errors.Is without wrapping.

type Error ΒΆ

type Error struct {
	// Code classifies the error. It is matched by errors.Is.
	Code ErrCode
	// Message is a human-readable description.
	Message string
	// Cause is the underlying error, if any. It is exposed through Unwrap.
	Cause error
}

Error is the unified error type for knifer-go subpackages.

Subpackages that want to participate in the cross-cutting error contract should return *Error and wrap any underlying cause through Cause so that callers can rely on errors.Is(err, knifer.ErrCodeXxx) and on the standard error-chain helpers.

Example ΒΆ
package main

import (
	"errors"
	"fmt"

	"github.com/imajinyun/knifer-go"
)

func main() {
	err := knifer.NewError(knifer.ErrCodeInvalidInput, "url is empty")
	fmt.Println(errors.Is(err, knifer.ErrCodeInvalidInput))
	fmt.Println(err)
}
Output:
true
GK_INVALID_INPUT: url is empty

func Errorf ΒΆ

func Errorf(code ErrCode, format string, args ...any) *Error

Errorf builds an *Error whose message is formatted with fmt.Sprintf.

func NewError ΒΆ

func NewError(code ErrCode, message string) *Error

NewError builds an *Error with the given code and message.

func WrapError ΒΆ

func WrapError(code ErrCode, message string, cause error) *Error

WrapError builds an *Error that wraps cause; cause is preserved on the chain and remains discoverable via errors.Is / errors.As.

Example ΒΆ
package main

import (
	"errors"
	"fmt"

	"github.com/imajinyun/knifer-go"
)

func main() {
	cause := errors.New("connection refused")
	err := knifer.WrapError(knifer.ErrCodeTimeout, "dial failed", cause)
	fmt.Println(errors.Is(err, knifer.ErrCodeTimeout))
	fmt.Println(errors.Is(err, cause))
}
Output:
true
true

func (*Error) Error ΒΆ

func (e *Error) Error() string

Error returns "CODE: Message" or "CODE: Message: cause" when Cause is set.

func (*Error) ErrorCode ΒΆ

func (e *Error) ErrorCode() ErrCode

ErrorCode returns the error code carried by e.

func (*Error) Is ΒΆ

func (e *Error) Is(target error) bool

Is reports whether target matches this error.

It returns true when target is the same ErrCode value or another *Error with the same Code. The standard library walks the chain via Unwrap, so callers can write errors.Is(err, knifer.ErrCodeInvalidInput).

func (*Error) Unwrap ΒΆ

func (e *Error) Unwrap() error

Unwrap returns the underlying cause, enabling errors.Is and errors.As to traverse the error chain.

Directories ΒΆ

Path Synopsis
bin
apifreezecheck command
ciworkflowcheck command
coveragecheck command
errormodelcheck command
internal/govreport
Package govreport provides a shared JSON report envelope for governance checkers.
Package govreport provides a shared JSON report envelope for governance checkers.
lifecyclecheck command
namingcheck
Package namingcheck enforces AST-based naming contracts for knifer-go APIs.
Package namingcheck enforces AST-based naming contracts for knifer-go APIs.
toolsgen command
Command toolsgen generates docs/api/tools.json, a machine-readable catalog of the public v* facade functions for AI/tooling consumption.
Command toolsgen generates docs/api/tools.json, a machine-readable catalog of the public v* facade functions for AI/tooling consumption.
internal
ai
Package ai implements provider-neutral AI adapter primitives.
Package ai implements provider-neutral AI adapter primitives.
bean
Package bean provides struct/map property mapping helpers.
Package bean provides struct/map property mapping helpers.
bloomfilter
Package bloomfilter provides Bloom filters and extended bitmap implementations.
Package bloomfilter provides Bloom filters and extended bitmap implementations.
boolean
Package boolean provides boolean helpers.
Package boolean provides boolean helpers.
cache
Package cache provides cache implementations inspired by Cache, including FIFO, LFU, LRU, Timed, Weak, and NoCache variants.
Package cache provides cache implementations inspired by Cache, including FIFO, LFU, LRU, Timed, Weak, and NoCache variants.
cli
Package cli implements dependency-free helpers for lightweight command-line tooling.
Package cli implements dependency-free helpers for lightweight command-line tooling.
codec
Package codec provides encoding and decoding helpers.
Package codec provides encoding and decoding helpers.
conf
Package conf provides configuration file readers for properties, setting, and simple YAML formats.
Package conf provides configuration file readers for properties, setting, and simple YAML formats.
constraint
Package constraint contains internal generic type constraints shared by implementation packages.
Package constraint contains internal generic type constraints shared by implementation packages.
conv
Package conv provides permissive type conversion helpers.
Package conv provides permissive type conversion helpers.
cron
Package cron provides a cron-expression-based task scheduling framework aligned with the utility toolkit-cron.
Package cron provides a cron-expression-based task scheduling framework aligned with the utility toolkit-cron.
crypto
Package crypto provides security-oriented digest, HMAC, AES, RSA, and PEM encoding helpers.
Package crypto provides security-oriented digest, HMAC, AES, RSA, and PEM encoding helpers.
csvx
Package csvx provides CSV reader and writer helpers.
Package csvx provides CSV reader and writer helpers.
date
Package date provides date and time helpers.
Package date provides date and time helpers.
db
Package db provides database helpers built on top of database/sql.
Package db provides database helpers built on top of database/sql.
dfa
Package dfa provides deterministic-finite-automaton text matching utilities.
Package dfa provides deterministic-finite-automaton text matching utilities.
errx
Package errx provides small error handling and panic-recovery helpers used by internal packages.
Package errx provides small error handling and panic-recovery helpers used by internal packages.
file
Package file provides file and IO helpers.
Package file provides file and IO helpers.
ftp
Package ftp implements provider-neutral FTP transfer primitives.
Package ftp implements provider-neutral FTP transfer primitives.
geo
Package geo provides coordinate conversion helpers for common China map coordinate systems.
Package geo provides coordinate conversion helpers for common China map coordinate systems.
hash
Package hash provides general-purpose hash helpers.
Package hash provides general-purpose hash helpers.
httpboundary
Package httpboundary centralizes HTTP trust-boundary host classification.
Package httpboundary centralizes HTTP trust-boundary host classification.
httpx
Package httpx provides HTTP client and server implementations.
Package httpx provides HTTP client and server implementations.
httpx/http
Package http is aligned with the utility toolkit-http and provides HTTP client, download, Cookie, UserAgent, SimpleServer, and related utilities.
Package http is aligned with the utility toolkit-http and provides HTTP client, download, Cookie, UserAgent, SimpleServer, and related utilities.
httpx/internal/shared
Package shared holds engine-agnostic HTTP protocol types and helpers (methods, headers, content types, and errors).
Package shared holds engine-agnostic HTTP protocol types and helpers (methods, headers, content types, and errors).
httpx/resty
Package resty provides the internal implementation for the vresty package.
Package resty provides the internal implementation for the vresty package.
id
Package id provides helpers for generating unique identifiers.
Package id provides helpers for generating unique identifiers.
identity
Package identity implements identity and legal identifier helpers.
Package identity implements identity and legal identifier helpers.
imgx
Package imgx provides image helpers, graphical captcha generators, and ZXing-backed QR/barcode utilities.
Package imgx provides image helpers, graphical captcha generators, and ZXing-backed QR/barcode utilities.
job
Package job provides helpers for running sliceable work with configurable scheduling.
Package job provides helpers for running sliceable work with configurable scheduling.
json
Package json provides JSON parsing and generation helpers, including objects, arrays, path access, and lightweight XML conversion adapters.
Package json provides JSON parsing and generation helpers, including objects, arrays, path access, and lightweight XML conversion adapters.
jwt
Package jwt provides JWT (JSON Web Token) creation, parsing, signing, and validation utilities matching the utility toolkit-jwt.
Package jwt provides JWT (JSON Web Token) creation, parsing, signing, and validation utilities matching the utility toolkit-jwt.
log
Package log provides a unified logging interface and default console implementations matching the utility toolkit-log.
Package log provides a unified logging interface and default console implementations matching the utility toolkit-log.
mail
Package mail provides message construction, MIME attachment rendering, and SMTP sending helpers.
Package mail provides message construction, MIME attachment rendering, and SMTP sending helpers.
maps
Package maps provides common helpers for Go map collections.
Package maps provides common helpers for Go map collections.
mask
Package mask provides internal data masking helpers.
Package mask provides internal data masking helpers.
net
Package net provides network, IP, TLS, and multipart helpers.
Package net provides network, IP, TLS, and multipart helpers.
num
Package num provides numeric helpers.
Package num provides numeric helpers.
obj
Package obj provides internal object helpers.
Package obj provides internal object helpers.
pass
Package pass provides password strength analysis helpers.
Package pass provides password strength analysis helpers.
pinyin
Package pinyin implements provider-neutral Chinese-to-pinyin primitives.
Package pinyin implements provider-neutral Chinese-to-pinyin primitives.
poi
Package poi provides internal office-document utilities.
Package poi provides internal office-document utilities.
rand
Package rand provides random value helpers.
Package rand provides random value helpers.
ref
Package ref provides reflection helpers for fields, methods, construction, invocation, and safe value conversion.
Package ref provides reflection helpers for fields, methods, construction, invocation, and safe value conversion.
regex
Package regex provides regular-expression helpers.
Package regex provides regular-expression helpers.
semaphore
Package semaphore provides a weighted, context-aware counting semaphore.
Package semaphore provides a weighted, context-aware counting semaphore.
sets
Package sets provides generic and typed set utilities.
Package sets provides generic and typed set utilities.
slice
Package slice provides slice helpers.
Package slice provides slice helpers.
socket
Package socket provides NIO/AIO-style socket communication helpers.
Package socket provides NIO/AIO-style socket communication helpers.
ssh
Package ssh implements provider-neutral SSH and SFTP transfer primitives.
Package ssh implements provider-neutral SSH and SFTP transfer primitives.
str
Package str provides string and character helpers.
Package str provides string and character helpers.
system
Package system provides runtime, operating system, user, and host information utilities.
Package system provides runtime, operating system, user, and host information utilities.
template
Package template provides internal Go html/template rendering helpers.
Package template provides internal Go html/template rendering helpers.
tokenize
Package tokenize implements provider-neutral text tokenization primitives.
Package tokenize implements provider-neutral text tokenization primitives.
url
Package url provides internal URL and URI helpers.
Package url provides internal URL and URI helpers.
validator
Package validator provides value validation helpers.
Package validator provides value validation helpers.
version
Package version provides internal version comparison and expression matching helpers.
Package version provides internal version comparison and expression matching helpers.
xml
Package xml provides XML parsing, formatting, tree navigation, conversion, and escaping helpers.
Package xml provides XML parsing, formatting, tree navigation, conversion, and escaping helpers.
zip
Package zip provides internal compression helpers.
Package zip provides internal compression helpers.
Package vai provides provider-neutral AI chat and embedding helpers.
Package vai provides provider-neutral AI chat and embedding helpers.
Package vbean provides public APIs for struct and map property mapping.
Package vbean provides public APIs for struct and map property mapping.
Package vblf provides public APIs for Bloom filter utilities.
Package vblf provides public APIs for Bloom filter utilities.
Package vbool provides public APIs for boolean utilities.
Package vbool provides public APIs for boolean utilities.
Package vcache provides public APIs for cache utilities.
Package vcache provides public APIs for cache utilities.
Package vcli provides public APIs for lightweight command-line helpers.
Package vcli provides public APIs for lightweight command-line helpers.
Package vcodec provides public APIs for encoding and decoding utilities.
Package vcodec provides public APIs for encoding and decoding utilities.
Package vconf provides configuration file reading and grouped configuration utilities.
Package vconf provides configuration file reading and grouped configuration utilities.
Package vconv provides public APIs for permissive type conversion.
Package vconv provides public APIs for permissive type conversion.
Package vcron provides public APIs for cron scheduling utilities.
Package vcron provides public APIs for cron scheduling utilities.
Package vcrypto provides public APIs for cryptographic utilities.
Package vcrypto provides public APIs for cryptographic utilities.
Package vcsv provides public APIs for CSV reading and writing.
Package vcsv provides public APIs for CSV reading and writing.
Package vdate provides public APIs for date/time utilities.
Package vdate provides public APIs for date/time utilities.
Package vdb exposes database/sql helper APIs for SQL execution, query building, entities, conditions, pagination, transactions, named parameters, and lightweight metadata lookup.
Package vdb exposes database/sql helper APIs for SQL execution, query building, entities, conditions, pagination, transactions, named parameters, and lightweight metadata lookup.
Package vdfa exposes deterministic-finite-automaton text matching APIs.
Package vdfa exposes deterministic-finite-automaton text matching APIs.
Package verr exposes error handling, panic recovery, and stack helpers.
Package verr exposes error handling, panic recovery, and stack helpers.
Package vfile provides public APIs for file and IO utilities.
Package vfile provides public APIs for file and IO utilities.
Package vform provides public APIs for form and input validation utilities.
Package vform provides public APIs for form and input validation utilities.
Package vftp provides provider-neutral FTP list, download, and upload helpers.
Package vftp provides provider-neutral FTP list, download, and upload helpers.
Package vgeo provides public APIs for coordinate conversion utilities.
Package vgeo provides public APIs for coordinate conversion utilities.
Package vhan provides provider-neutral Han text romanization helpers.
Package vhan provides provider-neutral Han text romanization helpers.
Package vhash provides public APIs for hash utilities.
Package vhash provides public APIs for hash utilities.
Package vhttp provides public APIs for HTTP utilities.
Package vhttp provides public APIs for HTTP utilities.
Package vid provides public APIs for ID generation utilities.
Package vid provides public APIs for ID generation utilities.
Package vident provides identity and legal identifier helpers.
Package vident provides identity and legal identifier helpers.
Package vimg provides public APIs for image utilities.
Package vimg provides public APIs for image utilities.
Package vjob provides public APIs for sliceable job execution.
Package vjob provides public APIs for sliceable job execution.
Package vjson provides public APIs for JSON utilities.
Package vjson provides public APIs for JSON utilities.
Package vjwt provides public APIs for JWT utilities.
Package vjwt provides public APIs for JWT utilities.
Package vlog provides public APIs for logging utilities.
Package vlog provides public APIs for logging utilities.
Package vmail exposes email message construction, MIME attachment, and SMTP sending helpers.
Package vmail exposes email message construction, MIME attachment, and SMTP sending helpers.
Package vmap provides public APIs for map utilities.
Package vmap provides public APIs for map utilities.
Package vmask provides data masking (desensitization) utilities.
Package vmask provides data masking (desensitization) utilities.
Package vnet provides public APIs for network, IP, URL-encoding, TLS, and multipart utilities.
Package vnet provides public APIs for network, IP, URL-encoding, TLS, and multipart utilities.
Package vnum provides public APIs for numeric utilities.
Package vnum provides public APIs for numeric utilities.
Package vobj provides object utilities.
Package vobj provides object utilities.
Package vpass provides password strength helpers.
Package vpass provides password strength helpers.
Package vpoi provides office-document utilities.
Package vpoi provides office-document utilities.
Package vrand provides public APIs for random value utilities.
Package vrand provides public APIs for random value utilities.
Package vref provides public APIs for reflection utilities.
Package vref provides public APIs for reflection utilities.
Package vregex provides public APIs for regular-expression utilities.
Package vregex provides public APIs for regular-expression utilities.
Package vresty provides convenient HTTP client wrappers backed by resty.
Package vresty provides convenient HTTP client wrappers backed by resty.
Package vsem provides public APIs for semaphore utilities.
Package vsem provides public APIs for semaphore utilities.
Package vset provides public APIs for set utilities.
Package vset provides public APIs for set utilities.
Package vskt provides public APIs for socket utilities.
Package vskt provides public APIs for socket utilities.
Package vslice provides public APIs for slice utilities.
Package vslice provides public APIs for slice utilities.
Package vssh provides provider-neutral SSH command and SFTP transfer helpers.
Package vssh provides provider-neutral SSH command and SFTP transfer helpers.
Package vstr provides public APIs for string and text utilities.
Package vstr provides public APIs for string and text utilities.
Package vsys provides public APIs for system information utilities.
Package vsys provides public APIs for system information utilities.
Package vtok provides provider-neutral text tokenization helpers.
Package vtok provides provider-neutral text tokenization helpers.
Package vtpl provides Go html/template rendering utilities.
Package vtpl provides Go html/template rendering utilities.
Package vurl provides URL and URI utilities.
Package vurl provides URL and URI utilities.
Package vver provides version comparison and expression matching utilities.
Package vver provides version comparison and expression matching utilities.
Package vxml provides public APIs for XML utilities.
Package vxml provides public APIs for XML utilities.
Package vzip provides ZIP, gzip, and zlib utilities.
Package vzip provides ZIP, gzip, and zlib utilities.

Jump to

Keyboard shortcuts

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