Commits

juster  committed 99281f8

Cleanup gofmt's indent and the trimDepSpecs() func.

  • Participants
  • Parent commits c3c6327

Comments (0)

Files changed (1)

 const (
 	MAW_USERAGENT = "maw/1.0"
 	MAW_ENVVAR    = " MAWSECRET " // spaces are there so PKGBUILDs can't use it [easily]
-	OptQuery      CmdOpt          = iota
+)
+
+const (
+	OptQuery CmdOpt = iota
 	OptRemove
 	OptSync
 	OptDepTest
 }
 
 func (mopt *MawOpt) trimDepSpecs() {
-	newtargs := make([]string, len(mopt.Targets), len(mopt.Targets))
-
 TargetLoop:
 	for i, targ := range mopt.Targets {
 		for idx, ch := range targ {
 			switch ch {
-			case '<':
-				fallthrough
-			case '>':
-				fallthrough
-			case '=':
-				newtargs[i] = targ[:idx]
+			case '<', '>', '=':
+				mopt.Targets[i] = targ[:idx]
 				continue TargetLoop
 			}
 		}
-
-		newtargs[i] = targ
 	}
-
-	mopt.Targets = newtargs
 }
 
 // This is used by other files, like in srcpkg.go and aur.go.