Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
the729 committed Dec 15, 2019
1 parent e9a3b9a commit 2cb6498
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ You can serialize and deserialize the following basic types:
- bool
- int8, int16, int32, int64, uint8, uint16, uint32, uint64
- string
- slice, array, map
- slice, map

```golang
bytes, _ := lcs.Marshal("hello")
Expand Down Expand Up @@ -81,11 +81,14 @@ type MyStruct struct {

### Fixed length lists

Fixed length lists are supported as member of structs with "len" tag.
Arrays are treated as fixed length lists.

You can also specify fixed length for struct members with `len` tag. Slices and strings are supported.


```golang
type MyStruct struct {
Str string `lcs:"len=2"`
Bytes []byte `lcs:"len=4"`
OptionalBytes []byte `lcs:"len=4,optional"`
}
Expand Down

0 comments on commit 2cb6498

Please sign in to comment.