aboutsummaryrefslogtreecommitdiff
path: root/lib/bytes/bytes.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2019-01-29 04:44:02 +0700
committerShulhan <ms@kilabit.info>2019-01-29 04:44:02 +0700
commitbf676b267c86eb11e437deb42f889c7e242b7c93 (patch)
tree6f7f84e8ff671edf0882df97374b1a7f0282eb18 /lib/bytes/bytes.go
parent55fa1f89812135a405ceb2f69bf575ca3d4b0a9f (diff)
downloadpakakeh.go-bf676b267c86eb11e437deb42f889c7e242b7c93.tar.xz
lib/bytes: simplified if-else condition
Diffstat (limited to 'lib/bytes/bytes.go')
-rw-r--r--lib/bytes/bytes.go10
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