From 34c1e58332319bbf47b7f736269672c08d118fb5 Mon Sep 17 00:00:00 2001 From: "Frederick F. Kautz IV" Date: Tue, 3 Mar 2015 12:56:19 -0800 Subject: [PATCH] Renaming Package to goPackage to fix golint error --- buildscripts/verifier.go | 22 +++++++++++----------- pkg/api/minioapi/definitions.go | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/buildscripts/verifier.go b/buildscripts/verifier.go index a987e12fe..a0434a6a3 100644 --- a/buildscripts/verifier.go +++ b/buildscripts/verifier.go @@ -31,7 +31,7 @@ func errorf(format string, args ...interface{}) { exitCode = 2 } -type Package struct { +type goPackage struct { p *ast.Package fs *token.FileSet decl map[string]ast.Node @@ -39,7 +39,7 @@ type Package struct { used map[string]bool } -type usedWalker Package +type usedWalker goPackage // Walks through the AST marking used identifiers. func (p *usedWalker) Visit(node ast.Node) ast.Visitor { @@ -51,23 +51,23 @@ func (p *usedWalker) Visit(node ast.Node) ast.Visitor { return p } -type Report struct { +type report struct { pos token.Pos name string } -type Reports []Report +type reports []report // Len -func (l Reports) Len() int { return len(l) } +func (l reports) Len() int { return len(l) } // Less -func (l Reports) Less(i, j int) bool { return l[i].pos < l[j].pos } +func (l reports) Less(i, j int) bool { return l[i].pos < l[j].pos } // Swap -func (l Reports) Swap(i, j int) { l[i], l[j] = l[j], l[i] } +func (l reports) Swap(i, j int) { l[i], l[j] = l[j], l[i] } // Visits files for used nodes. -func (p *Package) Visit(node ast.Node) ast.Visitor { +func (p *goPackage) Visit(node ast.Node) ast.Visitor { u := usedWalker(*p) // hopefully p fields are references. switch n := node.(type) { // don't walk whole file, but only: @@ -129,7 +129,7 @@ func doDir(name string) { } func doPackage(fs *token.FileSet, pkg *ast.Package) { - p := &Package{ + p := &goPackage{ p: pkg, fs: fs, decl: make(map[string]ast.Node), @@ -200,10 +200,10 @@ func doPackage(fs *token.FileSet, pkg *ast.Package) { } // reports. - reports := Reports(nil) + reports := reports(nil) for name, node := range p.decl { if !p.used[name] { - reports = append(reports, Report{node.Pos(), name}) + reports = append(reports, report{node.Pos(), name}) } } sort.Sort(reports) diff --git a/pkg/api/minioapi/definitions.go b/pkg/api/minioapi/definitions.go index 6f495a9b3..cadfd6704 100644 --- a/pkg/api/minioapi/definitions.go +++ b/pkg/api/minioapi/definitions.go @@ -25,7 +25,7 @@ const ( maxObjectList = 1000 ) -// Object list response format +// ObjectListResponse format type ObjectListResponse struct { XMLName xml.Name `xml:"ListBucketResult" json:"-"` Name string