1
0
mirror of https://github.com/json-iterator/go.git synced 2025-11-29 22:47:28 +02:00

#53 move current config EnableXXX

This commit is contained in:
Tao Wen
2017-06-13 17:47:40 +08:00
parent 48e9f6ec84
commit d0418857ce
14 changed files with 218 additions and 152 deletions

View File

@@ -76,6 +76,7 @@ type Iterator struct {
// Create creates an empty Iterator instance
func NewIterator(cfg *Config) *Iterator {
cfg.init()
return &Iterator{
cfg: cfg,
reader: nil,
@@ -87,6 +88,7 @@ func NewIterator(cfg *Config) *Iterator {
// Parse parses a json buffer in io.Reader into an Iterator instance
func Parse(cfg *Config, reader io.Reader, bufSize int) *Iterator {
cfg.init()
return &Iterator{
cfg: cfg,
reader: reader,
@@ -98,6 +100,7 @@ func Parse(cfg *Config, reader io.Reader, bufSize int) *Iterator {
// ParseBytes parses a json byte slice into an Iterator instance
func ParseBytes(cfg *Config, input []byte) *Iterator {
cfg.init()
return &Iterator{
cfg: cfg,
reader: nil,