From b49f70c477e273b9d50d21cf9435d331f9bfa9fd Mon Sep 17 00:00:00 2001 From: Chao Xu Date: Tue, 27 Dec 2022 09:18:38 -0800 Subject: [PATCH] update readme (#2) --- README.md | 6 +++--- bcs/tag.go | 4 +--- bcs/unmarshaler.go | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index a029216..301b05c 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,9 @@ Binary Canonical Serialization (bcs) for Golang. [![Go Reference](https://pkg.go.dev/badge/github.com/fardream/go-bcs.svg)](https://pkg.go.dev/github.com/fardream/go-bcs) Binary Canonical Serialization (bcs) or Libra Canonical Serialization (lcs) is developed -for the shuttlered [libra/diem](https://www.diem.com/) blockchain project. +for the shuttered [libra/diem](https://www.diem.com/) blockchain project. -Its target is mainly rust-lang struct, although many [move-lang](https://github.com/move-language/move) based +BCS target is mainly rust-lang struct, although many [move-lang](https://github.com/move-language/move) based blockchains use it as serialization format. -Given its root in rust, bcs include many structs are unavailable in golang (or move-lang), such as enum, option. See [go package website](https://pkg.go.dev/github.com/fardream/go-bcs) for more details. +Given its root in rust, bcs include many features unavailable in golang (or move-lang), such as enum, option. See [go package website](https://pkg.go.dev/github.com/fardream/go-bcs) for more details. diff --git a/bcs/tag.go b/bcs/tag.go index 37c2f80..70c810d 100644 --- a/bcs/tag.go +++ b/bcs/tag.go @@ -5,9 +5,7 @@ import ( "strings" ) -const ( - tagName = "bcs" -) +const tagName = "bcs" const ( tagValue_Optional int64 = 1 << iota // optional diff --git a/bcs/unmarshaler.go b/bcs/unmarshaler.go index cea3474..3e80499 100644 --- a/bcs/unmarshaler.go +++ b/bcs/unmarshaler.go @@ -5,7 +5,7 @@ import "io" // Unmarshaler customizes the unmarshalling behavior for a type. // // Compared with other Unmarshalers in golang, the Unmarshaler here takes -// a [io.Reader] instead of []byte, since it is difficult to delimit the byte streams. +// a [io.Reader] instead of []byte, since it is difficult to delimit the byte streams without unmarshalling. type Unmarshaler interface { UnmarshalBCS(io.Reader) (int, error) }