Skip to content
This repository has been archived by the owner on Feb 17, 2021. It is now read-only.

Commit

Permalink
gocode: fix a bug with gbroot
Browse files Browse the repository at this point in the history
  • Loading branch information
stamblerre committed Nov 27, 2018
1 parent b3141dc commit 322154f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions internal/suggest/suggest.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ func (c *Config) Suggest(filename string, data []byte, cursor int) ([]Candidate,

fset, pos, pkg, imports := c.analyzePackage(filename, data, cursor)
if pkg == nil {
c.Logf("no package found for %s", filename)
return nil, 0
}
scope := pkg.Scope().Innermost(pos)
Expand Down
1 change: 1 addition & 0 deletions internal/suggest/suggest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ func testRegress(t *testing.T, testDir string) {
Logf: func(string, ...interface{}) {},
Context: &suggest.PackedContext{},
}
cfg.Logf = func(string, ...interface{}) {}
if testing.Verbose() {
cfg.Logf = t.Logf
}
Expand Down
5 changes: 5 additions & 0 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ package main
import (
"bytes"
"fmt"
<<<<<<< HEAD
=======
"go/build"
"go/importer"
>>>>>>> gocode: fix a bug with gbroot
"log"
"net"
"net/rpc"
Expand Down

0 comments on commit 322154f

Please sign in to comment.