mirror of https://github.com/golang/go.git
cmd/go/internal/modconv: remove unused variables
This commit is contained in:
parent
56c9f8e8cf
commit
2257a5bf23
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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]}})
|
||||
|
|
|
|||
|
|
@ -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]}})
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue