Skip to content

Commit

Permalink
golint
Browse files Browse the repository at this point in the history
  • Loading branch information
korfuri committed Jul 14, 2017
1 parent f9b1ae5 commit 5b582e2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
3 changes: 2 additions & 1 deletion corpus.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ func (c Corpus) Rel(fpath string) string {
return rel
}

// Returns the set of default corpora based on GOROOT and GOPATH.
// DefaultCorpora returns the set of default corpora based on GOROOT
// and GOPATH.
func DefaultCorpora() []Corpus {
srcdirs := build.Default.SrcDirs()
corpora := make([]Corpus, len(srcdirs))
Expand Down
2 changes: 1 addition & 1 deletion packagegraph.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func specialPackage(loadpath string) *Package {
// Graph. If the package was already loaded, it returns early. It
// always returns the Package object for the loaded package.
func (pg *PackageGraph) loadPackage(prog *loader.Program, loadpath string, pi *loader.PackageInfo) *Package {
var pkg *Package = nil
var pkg *Package
// First find whether we already know about this package,
// either because it's already in the graph (then return it)
// or because it has a hardcoded definition.
Expand Down
3 changes: 1 addition & 2 deletions position.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,8 @@ func (p Position) MarshalJSON() ([]byte, error) {
PosL: p.PosL,
PosC: p.PosC,
})
} else {
return json.Marshal(withend(p))
}
return json.Marshal(withend(p))
}

// ToProto marshals a Position as a pb.Position
Expand Down
4 changes: 2 additions & 2 deletions reftype.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,6 @@ func refTypeForIdent(prog *loader.Program, id *ast.Ident) RefType {
}

// MarshalJSON implements encoding/json.Marshaler interface
func (r RefType) MarshalJSON() ([]byte, error) {
return json.Marshal(r.String())
func (rt RefType) MarshalJSON() ([]byte, error) {
return json.Marshal(rt.String())
}

0 comments on commit 5b582e2

Please sign in to comment.