Skip to content

Commit aea3cc3

Browse files
committed
renames Formatter to Converter
1 parent 89c1db2 commit aea3cc3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ Out of the box, the following case conversion are supported:
2020
- Title Case (e.g. Title Case)
2121
- Other deliminations
2222

23-
Word boundaries are determined by the `caps.Formatter`. The provided implementation, `caps.FormatterImpl`,
23+
Word boundaries are determined by the `caps.Converter`. The provided implementation, `caps.ConverterImpl`,
2424
delegates the boundary detection to `caps.Tokenizer`. The provided implementation, `caps.TokenizerImpl`,
2525
uses the following runes as delimiters: `" _.!?:;$-(){}[]#@&+~"`.
2626

27-
`caps.StdFormatter` also allows users to register `caps.Replacement`s for acronym replacement. The default list is:
27+
`caps.StdConverter` also allows users to register `caps.Replacement`s for acronym replacement. The default list is:
2828

2929
```go
3030
{"Http", "HTTP"}
@@ -43,14 +43,14 @@ uses the following runes as delimiters: `" _.!?:;$-(){}[]#@&+~"`.
4343
If you would like to add or remove entries from that list, you have a few
4444
options.
4545

46-
You can pass a new instance of `caps.StdFormatter` with a new set of
46+
You can pass a new instance of `caps.StdConverter` with a new set of
4747
`caps.Replacement` (likely preferred).
4848

49-
You can create your own `caps.Formatter`. This could be as simple as
50-
implementing the single `Format` method, calling `caps.DefaultFormatter.Format`,
49+
You can create your own `caps.Converter`. This could be as simple as
50+
implementing the single `Convert` method, calling `caps.DefaultConverter.Convert`,
5151
and then modifying the result.
5252

53-
Finally, if you are so inclined, you can update `caps.DefaultFormatter`. Just be aware that the
53+
Finally, if you are so inclined, you can update `caps.DefaultConverter`. Just be aware that the
5454
module was not built with thread-safety in mind so you should set it once.
5555
Otherwise, you'll need guard your usage of the library accordingly.
5656

0 commit comments

Comments
 (0)