mirror of
https://github.com/golang/go
synced 2024-11-21 21:04:41 -07:00
fix build: wrong godoc code submitted before
R=r CC=golang-dev https://golang.org/cl/5644044
This commit is contained in:
parent
668418d122
commit
4151183e94
@ -896,14 +896,14 @@ func (x *Index) Read(r io.Reader) error {
|
||||
x.snippets = fx.Snippets
|
||||
if fx.Fulltext {
|
||||
x.fset = token.NewFileSet()
|
||||
if err := x.fset.Read(r); err != nil {
|
||||
return err
|
||||
}
|
||||
x.suffixes = new(suffixarray.Index)
|
||||
decode := func(x interface{}) error {
|
||||
return gob.NewDecoder(r).Decode(x)
|
||||
}
|
||||
if err := x.suffixes.Read(decode); err != nil {
|
||||
if err := x.fset.Read(decode); err != nil {
|
||||
return err
|
||||
}
|
||||
x.suffixes = new(suffixarray.Index)
|
||||
if err := x.suffixes.Read(r); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user