Commit Graph

15 Commits

Author SHA1 Message Date
68a97519d5 Merge pull request #4 from jimeh/fix-bytes-method
fix(bytes): change Bytes function to accept string input but return a byte slice
2020-12-14 14:55:04 +00:00
5dbdbbf341 fix(bytes): change Bytes function to accept string input but return a byte slice
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.
2020-12-14 14:52:32 +00:00
d79e413e8e chore(release): 1.0.1 v1.0.1 2020-12-07 10:48:40 +00:00
cc372da881 Merge pull request #3 from jimeh/remove-leading-line-break-on-undented-values
fix(whitespace): remove leading line-break from input
2020-12-07 10:46:31 +00:00
b2057429a1 fix(whitespace): remove leading line-break from input
This effectively cleans up what I consider syntactical sugar required
due to Go's syntax. For example:

    str := undent.String(`
        hello
        world`,
    )

In the above example I would consider the initial line-break after the
opening back-tick (`) character syntactical sugar, and hence should be
discarded from the final undented string.

However if the literal string contains more than one initial line-break,
only the first one should be removed, as the rest would intentionally be
part of the input.
2020-12-07 10:43:26 +00:00
24e64f6c39 docs(readme): fix readme description to match godoc description 2020-11-26 12:42:41 +00:00
30dba69951 docs(readme): add Benchmarks section, update Go Reference link 2020-11-26 12:32:58 +00:00
28d6c7e8de chore(release): 1.0.0 v1.0.0 2020-11-26 04:31:56 +00:00
fa86e7c1cc chore(release): add new-version make target, add release badge to readme 2020-11-26 04:31:21 +00:00
ffa6b79166 Merge pull request #2 from jimeh/update-readme
docs(readme): add badges, Go ref, and lincense links
2020-11-26 04:13:58 +00:00
7cd7677e9b docs(readme): add badges, Go ref, and lincense links 2020-11-26 04:12:47 +00:00
4dfb369149 Merge pull request #1 from jimeh/initial-implementation
feat(undent): initial implementation
2020-11-26 04:04:55 +00:00
d481444f94 ci(github): add CI workflow for GitHub Actions 2020-11-26 04:02:22 +00:00
6cdaf8a476 feat(undent): add initial implementation of String, Stringf, and Bytes 2020-11-26 03:02:09 +00:00
7228fc7247 docs(readme): add readme 2020-11-26 00:31:01 +00:00