How to use gofix?

133 views
Skip to first unread message

Jennal

unread,
Nov 9, 2011, 8:17:05 AM11/9/11
to golang-nuts
I am install the latest go environment on a new mac.
But when I try to install gocode(https://github.com/nsf/gocode), I got
a error message as following:

6g -o _go_.6 configfile.go
configfile.go:51: can't find import: errors
make: *** [_go_.6] Error 1


then I try to use gofix to fix this, but nothing happened.
I tried like this:

gofix -diff configfile.go
gofix < configfile.go
gofix configfile.go

nothing happened!!!
how can I do to fix the changes of APIs?

seems error.Error moved to os pkg, io.EOF moved to os.EOF...etc
Could someone help me?

Scott Lawrence

unread,
Nov 9, 2011, 9:16:55 AM11/9/11
to golan...@googlegroups.com
gofix can only be used to port old code forward. In this case, you're
running an older release of go than the code is written for - the
"errors" package is new. You should try updating to the latest weekly or
to tip, or installing an older version of gocode.

--
Scott Lawrence

Miguel Pignatelli

unread,
Nov 9, 2011, 9:19:34 AM11/9/11
to golan...@googlegroups.com

gofix -r error configfile.go

See gofix --help

M;

Miguel Pignatelli

unread,
Nov 9, 2011, 9:22:15 AM11/9/11
to golan...@googlegroups.com
On 09/11/11 14:19, Miguel Pignatelli wrote:
>
> gofix -r error configfile.go
>
> See gofix --help
>
> M;

Oh... Bad answer, sorry.
gocode works with the weekly release. You don't have to gofix nothing in
gocode, just to have the same release (weekly) installed.

M;

Reply all
Reply to author
Forward
0 new messages