dustin / go-humanize
Go Humans! (formatters for units to human friendly sizes)
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing dustin/go-humanize in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewHumane Units Just a few functions for helping humanize times and sizes. it as , import it as , use it as . See godoc for complete documentation. Sizes This lets you take numbers like and convert them to useful strings like, or (whichever you prefer). Example: Times This lets you take a and spit it out in relative terms. For example, or . Example: Thanks to Kyle Lemons for the time implementation from an IRC conversation one day. It's pretty neat. Ordinals From a [mailing list discussion][odisc] where a user wanted to be able to label ordinals. 0 -> 0th 1 -> 1st 2 -> 2nd 3 -> 3rd 4 -> 4th [...] Example: Commas Want to shove commas into numbers? Be my guest. 0 -> 0 100 -> 100 1000 -> 1,000 1000000000 -> 1,000,000,000 -100000 -> -100,000 Example: Ftoa Nicer float64 formatter that removes trailing zeros. SI notation Format numbers with [SI notation][sinotation]. Example: English-specific functions The following functions are in the subpackage. Plurals Simple English pluralization Word series Format comma-separated words lists with conjuctions: [odisc]: https://groups.google.com/d/topic/golang-nuts/l8NhI74jl-4/discussion [sinotation]: http://en.wikipedia.org/wiki/Metric_prefix