diff options
| author | Charlie Stanton <charlie@shtanton.xyz> | 2023-04-26 10:58:00 +0100 | 
|---|---|---|
| committer | Charlie Stanton <charlie@shtanton.xyz> | 2023-04-26 10:58:00 +0100 | 
| commit | e5965749d17d5a70f92fdc981f863e85b7543838 (patch) | |
| tree | 9756104001cdf337be9562f87eb6fabc8ad7ceee | |
| parent | 43aeb71f2d89ef74227de99a065c4af3a38fc755 (diff) | |
| download | stred-go-e5965749d17d5a70f92fdc981f863e85b7543838.tar | |
Slightly improve code quality of JSONIn.Read
| -rw-r--r-- | walk/read.go | 3 | 
1 files changed, 1 insertions, 2 deletions
| diff --git a/walk/read.go b/walk/read.go index e1b33a4..bedb856 100644 --- a/walk/read.go +++ b/walk/read.go @@ -179,10 +179,10 @@ func (in *JSONIn) Read() (WalkItem, error) {  			}  		}  		action := in.actionBuffer[in.actionIndex] +		in.actionIndex++  		switch action {  			case ActionReadValue:  				value := in.readValue() -				in.actionIndex++  				return WalkItem {  					Value: value,  					Path: in.path, @@ -208,7 +208,6 @@ func (in *JSONIn) Read() (WalkItem, error) {  			default:  				panic("Invalid ReadAction")  		} -		in.actionIndex++  	}  } | 
