# gookit/goutil

💪 Helper Utils(900+): int, byte, string, array/slice, map, struct, dump, convert/format, error, web/http, cli/flag, OS/ENV, filesystem, system, test/assert, time and more. Go 常用的工具函数：数字，字符串，数组，Map，结构体，反射，文本，文件，错误，时间日期，特殊处理，格式化，常用信息获取等等

Repository: https://github.com/gookit/goutil
Canonical: https://ross.abutalabs.com/products/goutil
Homepage: https://zread.ai/gookit/goutil
Language: Go
License: MIT
License Family: permissive
Topics: utils, go-library, tools, strings, cli-utilities, dumper, golang, utilities, go-utils, string, errors, go-errors, time-format, casting, converter, environments, filesystem, system-utils, go-flags, testing-tools
Last push: 2026-08-17T14:52:38+00:00

## Health v2 (maintenance only)
Score: 91/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 98, release rhythm 78, longevity 100
- inputs: {"age_days": 2983, "days_push": 16, "days_rel": 69, "gap_med": 53, "n_releases_24m": 10}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2360, forks 202 (observed 2026-08-28T04:06:40.856106+00:00)

## What it is
goutil is a Go utility library providing 900+ helper functions across packages for strings, arrays, maps, structs, reflection, errors, time, filesystem, environment, CLI, and testing. It includes extras like a value dumper, enhanced error wrapping with stacktraces, assertion helpers, and a flag wrapper for building simple CLI apps.

## Use cases
- manipulate and convert strings in go
- convert between int, string, and byte types
- merge and query nested maps
- dump go variables for debugging
- wrap errors with stack traces
- build simple command line apps with flags
- read and write files quickly
- mock env values in tests

## When to choose
- you want a batteries-included stdlib-style utility set for Go
- you need many small helpers (strings, slices, maps, fs, env) from one dependency
- you want enhanced error wrapping, dumping, or test assertions

## When to avoid
- you prefer minimal, single-purpose dependencies
- you need a framework for complex CLI apps rather than simple flag handling
- your project avoids reflection-heavy utility libraries

## Facets
- artifact type: library
- maturity: active
- function: developer-tools, serialization, logging, testing, cli, error-handling, file-system, date-time, math
- domain: developer-tools
- platform: go, cross-platform, cli
- tags: go-library, utilities, string-utils, slice-utils, map-utils, struct-utils, reflection, env-vars, dump, assert, cli-flags, ansi-colors, command-line, automation

## Member repositories
- gookit/goutil (main) score 91

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:40.856106+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:36:08.360438+00:00, confidence not recorded.
  - readme: https://github.com/gookit/goutil (fetched 2026-08-28T04:06:40.856106+00:00, sha 57507f8a281d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
