Skip to content

Commit daa6657

Browse files
committed
docs: improve readme
1 parent 8897553 commit daa6657

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

readme.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
# StructTags
22

3-
`structtags` provides several ways of parsing struct tags.
3+
`structtags` provides straightforward ways to parse, read, or modify struct tags.
44

55
- Some projects need a full parsing (key, values)
66
- Some others only need the key and the raw value.
77
- Other projects need to escape the comma.
88
- Etc.
99

10+
Instead of rewriting the wheel for each project, I also provided a package with the plumbing:
11+
- `parser.Tag()`: extracted from `reflect.StructTag` for the base parsing.
12+
- `parser.Value()`: to parse the value (support optional comma escaping).
13+
1014
This is the first version of the module, and I want to extend it based on feedback so that the API can evolve and break.
1115

1216
## Usage
@@ -114,6 +118,8 @@ Options:
114118

115119
### `structtags.ParseToFatih(tag, escapeComma)`
116120

121+
Compatibility layer with `fatih/structtag`.
122+
117123
Parses a struct tag to a `*structtag.Tags`.
118124

119125
The value is split on a comma.
@@ -190,12 +196,6 @@ type Foo struct {
190196

191197
</details>
192198

193-
`ldez/structtags` provides straightforward ways to parse, read, or modify struct tags, and a compatibility layer with `fatih/structtag` if you need it.
194-
195-
Instead of rewriting the wheel for each project, I also provided a package with the plumbing:
196-
- `parser.Tag()`: extracted from `reflect.StructTag` for the base parsing.
197-
- `parser.Value()`: to parse the value (support optional comma escaping).
198-
199199
## Notes
200200

201201
The [struct tag specifications](https://go.dev/ref/spec#Struct_types) say that struct tags can be any string.

0 commit comments

Comments
 (0)