diff options
| author | Shulhan <ms@kilabit.info> | 2019-01-29 04:44:02 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2019-01-29 04:44:02 +0700 |
| commit | bf676b267c86eb11e437deb42f889c7e242b7c93 (patch) | |
| tree | 6f7f84e8ff671edf0882df97374b1a7f0282eb18 /lib/bytes/bytes.go | |
| parent | 55fa1f89812135a405ceb2f69bf575ca3d4b0a9f (diff) | |
| download | pakakeh.go-bf676b267c86eb11e437deb42f889c7e242b7c93.tar.xz | |
lib/bytes: simplified if-else condition
Diffstat (limited to 'lib/bytes/bytes.go')
| -rw-r--r-- | lib/bytes/bytes.go | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/bytes/bytes.go b/lib/bytes/bytes.go index 713f4b3f..d1fee2c4 100644 --- a/lib/bytes/bytes.go +++ b/lib/bytes/bytes.go @@ -395,12 +395,10 @@ func TokenFind(line, token []byte, startat int) (at int) { // we found it! return at } - } else { - if at != -1 { - // reset back - y = 0 - at = -1 - } + } else if at != -1 { + // reset back + y = 0 + at = -1 } } // x run out before y |
