golang build时遇到expected 'STRING', found '<<'

如标题,遇到此问题:

$ go run pdfeditor.go
..\..\sirupsen\logrus\terminal_check_windows.go:9:2:
..\..\..\golang.org\x\sys\windows\syscall_test.go:10:1: expected 'STRING', found '<<'
..\..\..\golang.org\x\sys\windows\syscall_test.go:22:2: expected 'STRING', found 'if'
..\..\..\golang.org\x\sys\windows\syscall_test.go:26:2: expected 'STRING', found 'if'
..\..\..\golang.org\x\sys\windows\syscall_test.go:29:2: expected 'STRING', found 'if'
..\..\..\golang.org\x\sys\windows\syscall_test.go:45:2: expected 'STRING', found 'if'
..\..\..\golang.org\x\sys\windows\syscall_test.go:49:2: expected 'STRING', found 'if'
..\..\..\golang.org\x\sys\windows\syscall_test.go:52:2: expected 'STRING', found 'const'
..\..\..\golang.org\x\sys\windows\syscall_test.go:54:2: expected 'STRING', found 'if'
..\..\..\golang.org\x\sys\windows\syscall_test.go:63:2: expected 'STRING', found 'if'
..\..\..\golang.org\x\sys\windows\syscall_test.go:66:2: expected 'STRING', found 'if'
..\..\..\golang.org\x\sys\windows\syscall_test.go:70:50: expected ')', found 'EOF'

貌似是相应组件在windows上已经损坏了,我删除掉golang.org/x/,重新go get -u 挨个恢复就好了,go get 需要代理。

drwxr-xr-x 1 Administrator 197121         0 六月 15 09:31 crypto/
drwxr-xr-x 1 Administrator 197121         0 六月 15 09:31 exp/
drwxr-xr-x 1 Administrator 197121         0 六月 15 09:31 image/
drwxr-xr-x 1 Administrator 197121         0 六月 15 09:31 lint/
drwxr-xr-x 1 Administrator 197121         0 六月 15 09:31 mobile/
drwxr-xr-x 1 Administrator 197121         0 六月 15 09:31 net/
drwxr-xr-x 1 Administrator 197121         0 六月 15 09:31 oauth2/
drwxr-xr-x 1 Administrator 197121         0 六月 15 09:31 sys/
drwxr-xr-x 1 Administrator 197121         0 六月 15 09:31 text/
drwxr-xr-x 1 Administrator 197121         0 六月 15 09:31 time/
drwxr-xr-x 1 Administrator 197121         0 六月 15 09:31 tools/
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。