Skip to content
This repository has been archived by the owner on Nov 5, 2022. It is now read-only.

v0.3.1

Compare
Choose a tag to compare
@Fallenstedt Fallenstedt released this 24 May 02:21
· 53 commits to master since this release
7d90444

Fixes a race condition where unmarshaling json with bytes.Buffer across multiple goroutines caused panics.

SetUnmarshalHook is an optional hook allowing you to unmarshal json in a thread-safe way. By default you will stream []byte. However, this is not thread-safe.

This hook allows you to unmarshal json in the same goroutine where the bytes.Buffer was created, making it thread-safe.

See this example for how to use this hook well.