summaryrefslogtreecommitdiff
path: root/strutil
diff options
authorMaciej Borzecki <maciej.zenon.borzecki@canonical.com>2019-06-03 07:28:34 +0200
committerMaciej Borzecki <maciej.zenon.borzecki@canonical.com>2019-06-03 07:30:07 +0200
commit8d883ae66bbe8c1d4c9d31ef00cad85e62d9458a (patch)
treec52d30484d92903bff8c403ad37288eb1a08039f /strutil
parent8999873f68aba20f9b0dbb82e853e5d23c977da1 (diff)
strutil/shlex: fix ineffassign
The `state` variable is function local, assigning before return does not make sense. Fixes: github.com/snapcore/snapd/strutil/shlex/shlex.go:375:8: ineffectual assignment to state Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
Diffstat (limited to 'strutil')
-rw-r--r--strutil/shlex/shlex.go1
1 files changed, 0 insertions, 1 deletions
diff --git a/strutil/shlex/shlex.go b/strutil/shlex/shlex.go
index 3cb37b7e48..16b2dbbc11 100644
--- a/strutil/shlex/shlex.go
+++ b/strutil/shlex/shlex.go
@@ -372,7 +372,6 @@ func (t *Tokenizer) scanStream() (*Token, error) {
case spaceRuneClass:
{
if nextRune == '\n' {
- state = startState
token := &Token{
tokenType: tokenType,
value: string(value)}