mirror of
https://github.com/jimeh/undent.git
synced 2026-02-19 11:56:39 +00:00
5dbdbbf3416b024aac8fca4e218802d6ad49ea74
The old method signature was just nonsensical, as you would always be providing indented values via a string literal. So it makes much more sense to have all methods accept a string argument, and then return different types. This also allows use of a `Bytesf` method. This is technically a breaking change, but I'm classifying it as a bugfix cause the old method signature was basically useless.
undent
Go package which removes leading indentation/white-space from strings and byte slices.
s := undent.String(`
{
"hello": "world"
}`,
)
fmt.Println(s)
{
"hello": "world"
}
Documentation
Please see the Go Reference for documentation and examples.
Benchmarks
Benchmark reports and graphs are available here: https://jimeh.me/undent/dev/bench/
License
Languages
Go
89.6%
Makefile
10.4%