opethe1st / GoJson

Practising my golang skills
3 stars 0 forks source link

Implement iterator #1

Closed opethe1st closed 5 years ago

opethe1st commented 5 years ago

So I realised that I was pass in (s, current) into virtually every function and it made me realise there was probably a hidden abstraction missing. Initially, I thought that was scanner which basically had all the methods that were standalone functions but then I realised I was missing the concept of iterators which I added. I also removed the isMapping, isString and isSequence functions since they were just clutter.