]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go/internal/modconv: remove unused variables
authorLeon Klingele <git@leonklingele.de>
Wed, 30 Jan 2019 17:34:34 +0000 (17:34 +0000)
committerBryan C. Mills <bcmills@google.com>
Sat, 2 Mar 2019 04:59:43 +0000 (04:59 +0000)
Change-Id: I429db8dca219fb931f7b05ce7a7324e8c4ba935b
GitHub-Last-Rev: 2257a5bf23e7d79f54bedba2c2bed8c59bb6114c
GitHub-Pull-Request: golang/go#29999
Reviewed-on: https://go-review.googlesource.com/c/160423
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/go/internal/modconv/glide.go
src/cmd/go/internal/modconv/glock.go
src/cmd/go/internal/modconv/tsv.go
src/cmd/go/internal/modconv/vconf.go
src/cmd/go/internal/modconv/vyml.go

index 3bc675fcc0eb4bad6455ef14367659b118d6348a..18ab57814deb595e49714a6448de64d8b0ca1a71 100644 (file)
@@ -15,8 +15,7 @@ func ParseGlideLock(file string, data []byte) (*modfile.File, error) {
        mf := new(modfile.File)
        imports := false
        name := ""
-       for lineno, line := range strings.Split(string(data), "\n") {
-               lineno++
+       for _, line := range strings.Split(string(data), "\n") {
                if line == "" {
                        continue
                }
index 1b786a939c760cf2aff39544c96698fae9c5e37a..164a8e70d995541c83c616946a01ec2ba7f9a377 100644 (file)
@@ -13,8 +13,7 @@ import (
 
 func ParseGLOCKFILE(file string, data []byte) (*modfile.File, error) {
        mf := new(modfile.File)
-       for lineno, line := range strings.Split(string(data), "\n") {
-               lineno++
+       for _, line := range strings.Split(string(data), "\n") {
                f := strings.Fields(line)
                if len(f) >= 2 && f[0] != "cmd" {
                        mf.Require = append(mf.Require, &modfile.Require{Mod: module.Version{Path: f[0], Version: f[1]}})
index feba181e052252ed2b2c8cbe7e032080792b802f..106cddedd395760e3a061dbedf96ba81b2304abf 100644 (file)
@@ -13,8 +13,7 @@ import (
 
 func ParseDependenciesTSV(file string, data []byte) (*modfile.File, error) {
        mf := new(modfile.File)
-       for lineno, line := range strings.Split(string(data), "\n") {
-               lineno++
+       for _, line := range strings.Split(string(data), "\n") {
                f := strings.Split(line, "\t")
                if len(f) >= 3 {
                        mf.Require = append(mf.Require, &modfile.Require{Mod: module.Version{Path: f[0], Version: f[2]}})
index a9a8e62518f279e546300a6503f78e4b4cf30e51..f62eba77621d20c215b8ff267c23bb4fc39929dd 100644 (file)
@@ -13,8 +13,7 @@ import (
 
 func ParseVendorConf(file string, data []byte) (*modfile.File, error) {
        mf := new(modfile.File)
-       for lineno, line := range strings.Split(string(data), "\n") {
-               lineno++
+       for _, line := range strings.Split(string(data), "\n") {
                if i := strings.Index(line, "#"); i >= 0 {
                        line = line[:i]
                }
index 0f017a3c7a6b3109c0cd20c862e0436a3ff1812e..8a06519932c294deaa0f4bbf6a9189fc1ec3824f 100644 (file)
@@ -15,8 +15,7 @@ func ParseVendorYML(file string, data []byte) (*modfile.File, error) {
        mf := new(modfile.File)
        vendors := false
        path := ""
-       for lineno, line := range strings.Split(string(data), "\n") {
-               lineno++
+       for _, line := range strings.Split(string(data), "\n") {
                if line == "" {
                        continue
                }