Skip to content

Commit

Permalink
mention encoding/json/v2
Browse files Browse the repository at this point in the history
  • Loading branch information
yihuang committed Oct 23, 2023
1 parent 55be3ec commit 9c220f5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions types/chain_id.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import (
const ChainIDFieldName = "chain_id"

// ParseChainIDFromGenesis parses the chain-id from the genesis file using constant memory.
//
// TODO consider [encoding/json/v2](https://github.com/golang/go/discussions/63397) when it's ready.
func ParseChainIDFromGenesis(reader io.Reader) (string, error) {
decoder := jstream.NewDecoder(reader, 1).EmitKV()
var chain_id string
Expand Down

0 comments on commit 9c220f5

Please sign in to comment.