New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

main.go编译错误 #714

Closed
lovcong opened this Issue Dec 27, 2017 · 29 comments

Comments

Projects
None yet
4 participants
@lovcong

lovcong commented Dec 27, 2017

The Go code E:\Go\src\github.com\leanote\leanote\app\tmp\main.go:19 does not compile: must be imported as github.com/revel/modules/static/app/controllers
image

@zaizai0827

This comment has been minimized.

Show comment
Hide comment
@zaizai0827

zaizai0827 Jan 22, 2018

解决了吗?

zaizai0827 commented Jan 22, 2018

解决了吗?

@liuyp2003

This comment has been minimized.

Show comment
Hide comment
@liuyp2003

liuyp2003 Mar 2, 2018

这个问题解决了没?

liuyp2003 commented Mar 2, 2018

这个问题解决了没?

@lealife

This comment has been minimized.

Show comment
Hide comment
@lealife

lealife Mar 8, 2018

Member

请贴下环境变量GOPATH

Member

lealife commented Mar 8, 2018

请贴下环境变量GOPATH

@liuyp2003

This comment has been minimized.

Show comment
Hide comment
@liuyp2003

liuyp2003 Mar 8, 2018

GOPATH D:\Program Files\Java\gopath
GOROOT D:\Program Files\Java\go

liuyp2003 commented Mar 8, 2018

GOPATH D:\Program Files\Java\gopath
GOROOT D:\Program Files\Java\go

@lealife

This comment has been minimized.

Show comment
Hide comment
@lealife

lealife Mar 8, 2018

Member

Leanote源码并没有在你的GOPATH目录下, 请检查
src\github.com\leanote\leanote\app\tmp\main.go 不在 D:\Program Files\Java\gopath

Member

lealife commented Mar 8, 2018

Leanote源码并没有在你的GOPATH目录下, 请检查
src\github.com\leanote\leanote\app\tmp\main.go 不在 D:\Program Files\Java\gopath

@liuyp2003

This comment has been minimized.

Show comment
Hide comment
@liuyp2003

liuyp2003 Mar 8, 2018

我就是根据你们的文档,只是把leanote放到了gopath下面。
我现在准备按照你们的攻略,把gopath 跟goroot改成一样,不知道行不行。

liuyp2003 commented Mar 8, 2018

我就是根据你们的文档,只是把leanote放到了gopath下面。
我现在准备按照你们的攻略,把gopath 跟goroot改成一样,不知道行不行。

@lealife

This comment has been minimized.

Show comment
Hide comment
@lealife

lealife Mar 8, 2018

Member

你参考的是哪个文档?

Member

lealife commented Mar 8, 2018

你参考的是哪个文档?

@liuyp2003

This comment has been minimized.

Show comment
Hide comment
@lealife

This comment has been minimized.

Show comment
Hide comment
@lealife

lealife Mar 8, 2018

Member

你好, 请按照这个文档一样设置GOPATH

Member

lealife commented Mar 8, 2018

你好, 请按照这个文档一样设置GOPATH

@lealife lealife closed this Mar 8, 2018

@liuyp2003

This comment has been minimized.

Show comment
Hide comment
@liuyp2003

liuyp2003 Mar 9, 2018

这个文档设置GOPATH是根本不行的,因为按照他的设置,GOPATH跟GOROOT的目录一样,会直接报错。

liuyp2003 commented Mar 9, 2018

这个文档设置GOPATH是根本不行的,因为按照他的设置,GOPATH跟GOROOT的目录一样,会直接报错。

@liuyp2003

This comment has been minimized.

Show comment
Hide comment
@liuyp2003

liuyp2003 Mar 9, 2018

我用Revel重新创建了一个项目,很简单就起来了,并没有任何错误。
我想问下,你们这个项目最近没有自己down下来部署测试过?跟go1.8 go1.9 go1.10的兼容性是不是有做过?

liuyp2003 commented Mar 9, 2018

我用Revel重新创建了一个项目,很简单就起来了,并没有任何错误。
我想问下,你们这个项目最近没有自己down下来部署测试过?跟go1.8 go1.9 go1.10的兼容性是不是有做过?

@lealife lealife reopened this Mar 10, 2018

@lealife

This comment has been minimized.

Show comment
Hide comment
@lealife

lealife Mar 10, 2018

Member

请贴下你的GOPATH, Leanote代码的路径.

Member

lealife commented Mar 10, 2018

请贴下你的GOPATH, Leanote代码的路径.

@liuyp2003

This comment has been minimized.

Show comment
Hide comment
@liuyp2003

liuyp2003 Mar 12, 2018

set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\Administrator\AppData\Local\go-build
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=E:\Gopath
set GORACE=
set GOROOT=D:\Program Files\Go
set GOTMPDIR=
set GOTOOLDIR=D:\Program Files\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\ADMINI~1\AppData\Local\Temp\go-build372513194=/tmp/go-build -gno-record-gcc-switches

leanote的路径:E:\Gopath\src\github.com\leanote\leanote

liuyp2003 commented Mar 12, 2018

set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\Administrator\AppData\Local\go-build
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=E:\Gopath
set GORACE=
set GOROOT=D:\Program Files\Go
set GOTMPDIR=
set GOTOOLDIR=D:\Program Files\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\ADMINI~1\AppData\Local\Temp\go-build372513194=/tmp/go-build -gno-record-gcc-switches

leanote的路径:E:\Gopath\src\github.com\leanote\leanote

@lealife

This comment has been minimized.

Show comment
Hide comment
@lealife

lealife Mar 12, 2018

Member

路径是对的, 还有错?

Member

lealife commented Mar 12, 2018

路径是对的, 还有错?

@liuyp2003

This comment has been minimized.

Show comment
Hide comment
@liuyp2003

liuyp2003 Mar 12, 2018

有啊,启动就报这个错误。要不,你把这个项目down下来试试。

liuyp2003 commented Mar 12, 2018

有啊,启动就报这个错误。要不,你把这个项目down下来试试。

@lealife

This comment has been minimized.

Show comment
Hide comment
@lealife

lealife Mar 12, 2018

Member

请重新贴下报错截图

Member

lealife commented Mar 12, 2018

请重新贴下报错截图

@liuyp2003

This comment has been minimized.

Show comment
Hide comment
@liuyp2003

liuyp2003 Mar 12, 2018

E:\Gopath\src>revel run leanote
�[36mDEBUG�[0m 11:33:21 revel server.go:27: RegisterServerEngine: Registered engine �[36msection�[0m=server �[36mname�[0m=go
~
~ revel! http://revel.github.io
~
Trying to build with leanote (0x0,0x0)
�[36mDEBUG�[0m 11:33:21 revel module.go:145: Sorted keys �[36msection�[0m=module �[36mkeys�[0m=module.static
�[36mDEBUG�[0m 11:33:21 revel module.go:145: Sorted keys �[36msection�[0m=module �[36mkeys�[0m=module.testrunner
�[36mDEBUG�[0m 11:33:21 revel module.go:190: Loaded module �[36msection�[0m=module
�[32mINFO �[0m 11:33:21 revel revel.go:204: Initialized Revel �[32mVersion�[0m=0.18.0 �[32mBuildDate�[0m=2017-10-30 �[32mMinimumGoVersion�[0m=">= go1.6"
�[32mINFO �[0m 11:33:21 revel run.go:124: Running leanote (leanote) in dev mode

�[36mDEBUG�[0m 11:33:21 revel run.go:125: Base path: �[36mpath�[0m=E:\Gopath\src\leanote
�[36mDEBUG�[0m 11:33:21 revel run.go:129: Running in watched mode.
�[36mDEBUG�[0m 11:33:21 revel template.go:116: Refresh: Refreshing templates from �[36msection�[0m=template �[36mpath�[0m=[E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates]
�[36mDEBUG�[0m 11:33:21 revel template_engine.go:65: CreateTemplateEngine: init templates �[36msection�[0m=template �[36mname�[0m=go
�[36mDEBUG�[0m 11:33:21 revel template.go:144: Refresh: Refreshing templates from �[36msection�[0m=template �[36mpath�[0m=[E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates]
�[36mDEBUG�[0m 11:33:21 revel template.go:330: loadIntoEngine:Engine 'go' compiled E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates\errors\403.html �[36msection�[0m=template
�[36mDEBUG�[0m 11:33:21 revel template.go:330: loadIntoEngine:Engine 'go' compiled E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates\errors\403.json �[36msection�[0m=template
�[36mDEBUG�[0m 11:33:21 revel template.go:330: loadIntoEngine:Engine 'go' compiled E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates\errors\403.txt �[36msection�[0m=template
�[36mDEBUG�[0m 11:33:21 revel template.go:330: loadIntoEngine:Engine 'go' compiled E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates\errors\403.xml �[36msection�[0m=template
�[36mDEBUG�[0m 11:33:21 revel template.go:330: loadIntoEngine:Engine 'go' compiled E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates\errors\404-dev.html �[36msection�[0m=template
�[36mDEBUG�[0m 11:33:21 revel template.go:330: loadIntoEngine:Engine 'go' compiled E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates\errors\404.html �[36msection�[0m=template
�[36mDEBUG�[0m 11:33:21 revel template.go:330: loadIntoEngine:Engine 'go' compiled E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates\errors\404.json �[36msection�[0m=template
�[36mDEBUG�[0m 11:33:21 revel template.go:330: loadIntoEngine:Engine 'go' compiled E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates\errors\404.txt �[36msection�[0m=template
�[36mDEBUG�[0m 11:33:21 revel template.go:330: loadIntoEngine:Engine 'go' compiled E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates\errors\404.xml �[36msection�[0m=template
�[36mDEBUG�[0m 11:33:21 revel template.go:330: loadIntoEngine:Engine 'go' compiled E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates\errors\405.html �[36msection�[0m=template
�[36mDEBUG�[0m 11:33:21 revel template.go:330: loadIntoEngine:Engine 'go' compiled E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates\errors\405.json �[36msection�[0m=template
�[36mDEBUG�[0m 11:33:21 revel template.go:330: loadIntoEngine:Engine 'go' compiled E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates\errors\405.txt �[36msection�[0m=template
�[36mDEBUG�[0m 11:33:21 revel template.go:330: loadIntoEngine:Engine 'go' compiled E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates\errors\405.xml �[36msection�[0m=template
�[36mDEBUG�[0m 11:33:21 revel template.go:330: loadIntoEngine:Engine 'go' compiled E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates\errors\500-dev.html �[36msection�[0m=template
�[36mDEBUG�[0m 11:33:21 revel template.go:330: loadIntoEngine:Engine 'go' compiled E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates\errors\500.html �[36msection�[0m=template
�[36mDEBUG�[0m 11:33:21 revel template.go:330: loadIntoEngine:Engine 'go' compiled E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates\errors\500.json �[36msection�[0m=template
�[36mDEBUG�[0m 11:33:21 revel template.go:330: loadIntoEngine:Engine 'go' compiled E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates\errors\500.txt �[36msection�[0m=template
�[36mDEBUG�[0m 11:33:21 revel template.go:330: loadIntoEngine:Engine 'go' compiled E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates\errors\500.xml �[36msection�[0m=template
�[36mDEBUG�[0m 11:33:21 revel harness.go:146: Rebuild Called
�[32mINFO �[0m 11:33:21 revel build.go:235: Cleaning dir tmp
�[32mINFO �[0m 11:33:21 revel build.go:235: Cleaning dir routes
�[33mWARN �[0m 11:33:31 revel reflect.go:723: Type found in package: controllers, but did not embed from: revel.Controller �[33mname�[0m=DragNotebooksInfo �[33mpath�[0m=leanote/app/controllers
�[32mINFO �[0m 11:33:31 revel build.go:235: Cleaning dir tmp
�[32mINFO �[0m 11:33:31 revel build.go:235: Cleaning dir routes
�[32mINFO �[0m 11:33:31 revel build.go:87: Vendor folder detected, scanning for deps in path
�[36mDEBUG�[0m 11:33:31 revel build.go:214: Exec: �[36margs�[0m="[D:\Program Files\Git\bin\git.exe --git-dir=E:\Gopath\src\leanote\.git describe --always --dirty]"
�[36mDEBUG�[0m 11:33:32 revel build.go:139: Exec: �[36margs�[0m="[D:\Program Files\Go\bin\go.exe build -i -ldflags -X leanote/app.AppVersion=git-340df9c-dirty -X leanote/app.BuildTime=2018-03-12T03:33:32Z -tags -o E:\Gopath\bin\revel.d\leanote\leanote.exe leanote/app/tmp]"
�[31mERROR�[0m 11:33:38 revel build.go:146: leanote\app\tmp\main.go:19:2: must be imported as github.com/revel/modules/static/app/controllers

�[32mINFO �[0m 11:33:38 revel harness.go:190: Listening on 0.0.0.0:9000


你们直接down项目下来,应该是可以重现这个错误的吧。

liuyp2003 commented Mar 12, 2018

E:\Gopath\src>revel run leanote
�[36mDEBUG�[0m 11:33:21 revel server.go:27: RegisterServerEngine: Registered engine �[36msection�[0m=server �[36mname�[0m=go
~
~ revel! http://revel.github.io
~
Trying to build with leanote (0x0,0x0)
�[36mDEBUG�[0m 11:33:21 revel module.go:145: Sorted keys �[36msection�[0m=module �[36mkeys�[0m=module.static
�[36mDEBUG�[0m 11:33:21 revel module.go:145: Sorted keys �[36msection�[0m=module �[36mkeys�[0m=module.testrunner
�[36mDEBUG�[0m 11:33:21 revel module.go:190: Loaded module �[36msection�[0m=module
�[32mINFO �[0m 11:33:21 revel revel.go:204: Initialized Revel �[32mVersion�[0m=0.18.0 �[32mBuildDate�[0m=2017-10-30 �[32mMinimumGoVersion�[0m=">= go1.6"
�[32mINFO �[0m 11:33:21 revel run.go:124: Running leanote (leanote) in dev mode

�[36mDEBUG�[0m 11:33:21 revel run.go:125: Base path: �[36mpath�[0m=E:\Gopath\src\leanote
�[36mDEBUG�[0m 11:33:21 revel run.go:129: Running in watched mode.
�[36mDEBUG�[0m 11:33:21 revel template.go:116: Refresh: Refreshing templates from �[36msection�[0m=template �[36mpath�[0m=[E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates]
�[36mDEBUG�[0m 11:33:21 revel template_engine.go:65: CreateTemplateEngine: init templates �[36msection�[0m=template �[36mname�[0m=go
�[36mDEBUG�[0m 11:33:21 revel template.go:144: Refresh: Refreshing templates from �[36msection�[0m=template �[36mpath�[0m=[E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates]
�[36mDEBUG�[0m 11:33:21 revel template.go:330: loadIntoEngine:Engine 'go' compiled E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates\errors\403.html �[36msection�[0m=template
�[36mDEBUG�[0m 11:33:21 revel template.go:330: loadIntoEngine:Engine 'go' compiled E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates\errors\403.json �[36msection�[0m=template
�[36mDEBUG�[0m 11:33:21 revel template.go:330: loadIntoEngine:Engine 'go' compiled E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates\errors\403.txt �[36msection�[0m=template
�[36mDEBUG�[0m 11:33:21 revel template.go:330: loadIntoEngine:Engine 'go' compiled E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates\errors\403.xml �[36msection�[0m=template
�[36mDEBUG�[0m 11:33:21 revel template.go:330: loadIntoEngine:Engine 'go' compiled E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates\errors\404-dev.html �[36msection�[0m=template
�[36mDEBUG�[0m 11:33:21 revel template.go:330: loadIntoEngine:Engine 'go' compiled E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates\errors\404.html �[36msection�[0m=template
�[36mDEBUG�[0m 11:33:21 revel template.go:330: loadIntoEngine:Engine 'go' compiled E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates\errors\404.json �[36msection�[0m=template
�[36mDEBUG�[0m 11:33:21 revel template.go:330: loadIntoEngine:Engine 'go' compiled E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates\errors\404.txt �[36msection�[0m=template
�[36mDEBUG�[0m 11:33:21 revel template.go:330: loadIntoEngine:Engine 'go' compiled E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates\errors\404.xml �[36msection�[0m=template
�[36mDEBUG�[0m 11:33:21 revel template.go:330: loadIntoEngine:Engine 'go' compiled E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates\errors\405.html �[36msection�[0m=template
�[36mDEBUG�[0m 11:33:21 revel template.go:330: loadIntoEngine:Engine 'go' compiled E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates\errors\405.json �[36msection�[0m=template
�[36mDEBUG�[0m 11:33:21 revel template.go:330: loadIntoEngine:Engine 'go' compiled E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates\errors\405.txt �[36msection�[0m=template
�[36mDEBUG�[0m 11:33:21 revel template.go:330: loadIntoEngine:Engine 'go' compiled E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates\errors\405.xml �[36msection�[0m=template
�[36mDEBUG�[0m 11:33:21 revel template.go:330: loadIntoEngine:Engine 'go' compiled E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates\errors\500-dev.html �[36msection�[0m=template
�[36mDEBUG�[0m 11:33:21 revel template.go:330: loadIntoEngine:Engine 'go' compiled E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates\errors\500.html �[36msection�[0m=template
�[36mDEBUG�[0m 11:33:21 revel template.go:330: loadIntoEngine:Engine 'go' compiled E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates\errors\500.json �[36msection�[0m=template
�[36mDEBUG�[0m 11:33:21 revel template.go:330: loadIntoEngine:Engine 'go' compiled E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates\errors\500.txt �[36msection�[0m=template
�[36mDEBUG�[0m 11:33:21 revel template.go:330: loadIntoEngine:Engine 'go' compiled E:\Gopath\src\leanote\vendor\github.com\revel\revel\templates\errors\500.xml �[36msection�[0m=template
�[36mDEBUG�[0m 11:33:21 revel harness.go:146: Rebuild Called
�[32mINFO �[0m 11:33:21 revel build.go:235: Cleaning dir tmp
�[32mINFO �[0m 11:33:21 revel build.go:235: Cleaning dir routes
�[33mWARN �[0m 11:33:31 revel reflect.go:723: Type found in package: controllers, but did not embed from: revel.Controller �[33mname�[0m=DragNotebooksInfo �[33mpath�[0m=leanote/app/controllers
�[32mINFO �[0m 11:33:31 revel build.go:235: Cleaning dir tmp
�[32mINFO �[0m 11:33:31 revel build.go:235: Cleaning dir routes
�[32mINFO �[0m 11:33:31 revel build.go:87: Vendor folder detected, scanning for deps in path
�[36mDEBUG�[0m 11:33:31 revel build.go:214: Exec: �[36margs�[0m="[D:\Program Files\Git\bin\git.exe --git-dir=E:\Gopath\src\leanote\.git describe --always --dirty]"
�[36mDEBUG�[0m 11:33:32 revel build.go:139: Exec: �[36margs�[0m="[D:\Program Files\Go\bin\go.exe build -i -ldflags -X leanote/app.AppVersion=git-340df9c-dirty -X leanote/app.BuildTime=2018-03-12T03:33:32Z -tags -o E:\Gopath\bin\revel.d\leanote\leanote.exe leanote/app/tmp]"
�[31mERROR�[0m 11:33:38 revel build.go:146: leanote\app\tmp\main.go:19:2: must be imported as github.com/revel/modules/static/app/controllers

�[32mINFO �[0m 11:33:38 revel harness.go:190: Listening on 0.0.0.0:9000


你们直接down项目下来,应该是可以重现这个错误的吧。

@liuyp2003

This comment has been minimized.

Show comment
Hide comment
@liuyp2003

liuyp2003 Mar 12, 2018

这个是我刚刚从down到本地的leanote项目,依然报这个错误。

liuyp2003 commented Mar 12, 2018

这个是我刚刚从down到本地的leanote项目,依然报这个错误。

@lealife

This comment has been minimized.

Show comment
Hide comment
@lealife

lealife Mar 12, 2018

Member

"Listening on 0.0.0.0:9000" 不是运行成功了吗?

Member

lealife commented Mar 12, 2018

"Listening on 0.0.0.0:9000" 不是运行成功了吗?

@liuyp2003

This comment has been minimized.

Show comment
Hide comment
@liuyp2003

liuyp2003 Mar 12, 2018

localhost:9000访问后的页面显示结果。这个建议你重现一下,直接把代码下到本地,运行一下就好了。

Go Compilation Error
The Go code leanote\app\tmp\main.go does not compile: must be imported as github.com/revel/modules/static/app/controllers
In leanote\app\tmp\main.go (around line 19)
14:_ "leanote/app/lea/binder"
15:_ "leanote/app/lea/captcha"
16:_ "leanote/app/lea/i18n"
17:_ "leanote/app/service"
18: _ "leanote/app/tests"
19:controllers0 "leanote/vendor/github.com/revel/modules/static/app/controllers"
20:"github.com/revel/revel/testing"
21:)
var (

liuyp2003 commented Mar 12, 2018

localhost:9000访问后的页面显示结果。这个建议你重现一下,直接把代码下到本地,运行一下就好了。

Go Compilation Error
The Go code leanote\app\tmp\main.go does not compile: must be imported as github.com/revel/modules/static/app/controllers
In leanote\app\tmp\main.go (around line 19)
14:_ "leanote/app/lea/binder"
15:_ "leanote/app/lea/captcha"
16:_ "leanote/app/lea/i18n"
17:_ "leanote/app/service"
18: _ "leanote/app/tests"
19:controllers0 "leanote/vendor/github.com/revel/modules/static/app/controllers"
20:"github.com/revel/revel/testing"
21:)
var (

@liuyp2003

This comment has been minimized.

Show comment
Hide comment
@liuyp2003

liuyp2003 Mar 12, 2018

�[32mINFO �[0m 11:33:31 revel build.go:87: Vendor folder detected, scanning for deps in path
�[36mDEBUG�[0m 11:33:31 revel build.go:214: Exec: �[36margs�[0m="[D:\Program Files\Git\bin\git.exe --git-dir=E:\Gopath\src\leanote.git describe --always --dirty]"
�[36mDEBUG�[0m 11:33:32 revel build.go:139: Exec: �[36margs�[0m="[D:\Program Files\Go\bin\go.exe build -i -ldflags -X leanote/app.AppVersion=git-340df9c-dirty -X leanote/app.BuildTime=2018-03-12T03:33:32Z -tags -o E:\Gopath\bin\revel.d\leanote\leanote.exe leanote/app/tmp]"
# �[31mERROR�[0m 11:33:38 revel build.go:146: leanote\app\tmp\main.go:19:2: must be imported as github.com/revel/modules/static/app/controllers

�[32mINFO �[0m 11:33:38 revel harness.go:190: Listening on 0.0.0.0:9000

liuyp2003 commented Mar 12, 2018

�[32mINFO �[0m 11:33:31 revel build.go:87: Vendor folder detected, scanning for deps in path
�[36mDEBUG�[0m 11:33:31 revel build.go:214: Exec: �[36margs�[0m="[D:\Program Files\Git\bin\git.exe --git-dir=E:\Gopath\src\leanote.git describe --always --dirty]"
�[36mDEBUG�[0m 11:33:32 revel build.go:139: Exec: �[36margs�[0m="[D:\Program Files\Go\bin\go.exe build -i -ldflags -X leanote/app.AppVersion=git-340df9c-dirty -X leanote/app.BuildTime=2018-03-12T03:33:32Z -tags -o E:\Gopath\bin\revel.d\leanote\leanote.exe leanote/app/tmp]"
# �[31mERROR�[0m 11:33:38 revel build.go:146: leanote\app\tmp\main.go:19:2: must be imported as github.com/revel/modules/static/app/controllers

�[32mINFO �[0m 11:33:38 revel harness.go:190: Listening on 0.0.0.0:9000

@lealife

This comment has been minimized.

Show comment
Hide comment
@lealife

lealife Mar 12, 2018

Member

@liuyp2003 你是通过什么方式下载Leanote源码的? 直接下载的是leanote-all?
还有, 麻烦贴下你的GO版本

Member

lealife commented Mar 12, 2018

@liuyp2003 你是通过什么方式下载Leanote源码的? 直接下载的是leanote-all?
还有, 麻烦贴下你的GO版本

@liuyp2003

This comment has been minimized.

Show comment
Hide comment
@liuyp2003

liuyp2003 Mar 12, 2018

E:\Gopath\src>go version
go version go1.10 windows/amd64

leanote-all
leanote/leanote 两个都有下载,通过git下载到本地的。
我之前有试过go1.8.5、 go1.9.2貌似都有这样的问题。
另外,如果是把go安装在C盘,会报另外一个错误。你们可以自己验证一下。

liuyp2003 commented Mar 12, 2018

E:\Gopath\src>go version
go version go1.10 windows/amd64

leanote-all
leanote/leanote 两个都有下载,通过git下载到本地的。
我之前有试过go1.8.5、 go1.9.2貌似都有这样的问题。
另外,如果是把go安装在C盘,会报另外一个错误。你们可以自己验证一下。

@lealife

This comment has been minimized.

Show comment
Hide comment
@lealife

lealife Mar 12, 2018

Member

估计是vendor的问题, 把 leanote\vendor文件夹删掉试试

Member

lealife commented Mar 12, 2018

估计是vendor的问题, 把 leanote\vendor文件夹删掉试试

@liuyp2003

This comment has been minimized.

Show comment
Hide comment
@liuyp2003

liuyp2003 Mar 12, 2018

删掉问题更加多。大神,你们先down项目下去,重现下问题研究下。

leanote/vendor/leanote/app/controllers/admin

vendor\leanote\app\controllers\admin\AdminBlogController.go:23:25: cannot use c.AdminBaseController.BaseController.Controller.RenderTemplate("admin/blog/list.html") (type "github.com/leanote/leanote/vendor/github.com/revel/revel".Result) as type "github.com/revel/revel".Result in return argument:
"github.com/leanote/leanote/vendor/github.com/revel/revel".Result does not implement "github.com/revel/revel".Result (wrong type for Apply method)
have Apply(*"github.com/leanote/leanote/vendor/github.com/revel/revel".Request, "github.com/leanote/leanote/vendor/github.com/revel/revel".Response)
want Apply(
"github.com/revel/revel".Request, "github.com/revel/revel".Response)
vendor\leanote\app\controllers\admin\AdminBlogController.go:29:21: cannot use c.AdminBaseController.BaseController.Controller.RenderJSON(re) (type "github.com/leanote/leanote/vendor/github.com/revel/revel".Result) as type "github.com/revel/revel".Result in return argument:
"github.com/leanote/leanote/vendor/github.com/revel/revel".Result does not implement "github.com/revel/revel".Result (wrong type for Apply method)
have Apply(
"github.com/leanote/leanote/vendor/github.com/revel/revel".Request, "github.com/leanote/leanote/vendor/github.com/revel/revel".Response)
want Apply(
"github.com/revel/revel".Request, "github.com/revel/revel".Response)
vendor\leanote\app\controllers\admin\AdminController.go:24:25: cannot use c.AdminBaseController.BaseController.Controller.RenderTemplate("admin/index.html") (type "github.com/leanote/leanote/vendor/github.com/revel/revel".Result) as type "github.com/revel/revel".Result in return argument:
"github.com/leanote/leanote/vendor/github.com/revel/revel".Result does not implement "github.com/revel/revel".Result (wrong type for Apply method)
have Apply(
"github.com/leanote/leanote/vendor/github.com/revel/revel".Request, "github.com/leanote/leanote/vendor/github.com/revel/revel".Response)
want Apply(
"github.com/revel/revel".Request, "github.com/revel/revel".Response)
vendor\leanote\app\controllers\admin\AdminController.go:34:25: cannot use c.AdminBaseController.BaseController.Controller.RenderTemplate("admin/" + t + ".html") (type "github.com/leanote/leanote/vendor/github.com/revel/revel".Result) as type "github.com/revel/revel".Result in return argument:
"github.com/leanote/leanote/vendor/github.com/revel/revel".Result does not implement "github.com/revel/revel".Result (wrong type for Apply method)
have Apply(
"github.com/leanote/leanote/vendor/github.com/revel/revel".Request, "github.com/leanote/leanote/vendor/github.com/revel/revel".Response)
want Apply(
"github.com/revel/revel".Request, "github.com/revel/revel".Response)
vendor\leanote\app\controllers\admin\AdminController.go:38:25: cannot use c.AdminBaseController.BaseController.Controller.RenderTemplate("admin/" + view) (type "github.com/leanote/leanote/vendor/github.com/revel/revel".Result) as type "github.com/revel/revel".Result in return argument:
"github.com/leanote/leanote/vendor/github.com/revel/revel".Result does not implement "github.com/revel/revel".Result (wrong type for Apply method)
have Apply(
"github.com/leanote/leanote/vendor/github.com/revel/revel".Request, "github.com/leanote/leanote/vendor/github.com/revel/revel".Response)
want Apply(
"github.com/revel/revel".Request, "github.com/revel/revel".Response)
vendor\leanote\app\controllers\admin\AdminData.go:30:25: cannot use c.AdminBaseController.BaseController.Controller.RenderTemplate("admin/data/index.html") (type "github.com/leanote/leanote/vendor/github.com/revel/revel".Result) as type "github.com/revel/revel".Result in return argument:
"github.com/leanote/leanote/vendor/github.com/revel/revel".Result does not implement "github.com/revel/revel".Result (wrong type for Apply method)
have Apply(
"github.com/leanote/leanote/vendor/github.com/revel/revel".Request, "github.com/leanote/leanote/vendor/github.com/revel/revel".Response)
want Apply(
"github.com/revel/revel".Request, "github.com/revel/revel".Response)
vendor\leanote\app\controllers\admin\AdminData.go:36:21: cannot use c.AdminBaseController.BaseController.Controller.RenderJSON(re) (type "github.com/leanote/leanote/vendor/github.com/revel/revel".Result) as type "github.com/revel/revel".Result in return argument:
"github.com/leanote/leanote/vendor/github.com/revel/revel".Result does not implement "github.com/revel/revel".Result (wrong type for Apply method)
have Apply(
"github.com/leanote/leanote/vendor/github.com/revel/revel".Request, "github.com/leanote/leanote/vendor/github.com/revel/revel".Response)
want Apply(
"github.com/revel/revel".Request, "github.com/revel/revel".Response)
vendor\leanote\app\controllers\admin\AdminData.go:43:21: cannot use c.AdminBaseController.BaseController.Controller.RenderJSON(re) (type "github.com/leanote/leanote/vendor/github.com/revel/revel".Result) as type "github.com/revel/revel".Result in return argument:
"github.com/leanote/leanote/vendor/github.com/revel/revel".Result does not implement "github.com/revel/revel".Result (wrong type for Apply method)
have Apply(
"github.com/leanote/leanote/vendor/github.com/revel/revel".Request, "github.com/leanote/leanote/vendor/github.com/revel/revel".Response)
want Apply(
"github.com/revel/revel".Request, "github.com/revel/revel".Response)
vendor\leanote\app\controllers\admin\AdminData.go:49:21: cannot use c.AdminBaseController.BaseController.Controller.RenderJSON(re) (type "github.com/leanote/leanote/vendor/github.com/revel/revel".Result) as type "github.com/revel/revel".Result in return argument:
"github.com/leanote/leanote/vendor/github.com/revel/revel".Result does not implement "github.com/revel/revel".Result (wrong type for Apply method)
have Apply(
"github.com/leanote/leanote/vendor/github.com/revel/revel".Request, "github.com/leanote/leanote/vendor/github.com/revel/revel".Response)
want Apply(
"github.com/revel/revel".Request, "github.com/revel/revel".Response)
vendor\leanote\app\controllers\admin\AdminData.go:55:21: cannot use c.AdminBaseController.BaseController.Controller.RenderJSON(re) (type "github.com/leanote/leanote/vendor/github.com/revel/revel".Result) as type "github.com/revel/revel".Result in return argument:
"github.com/leanote/leanote/vendor/github.com/revel/revel".Result does not implement "github.com/revel/revel".Result (wrong type for Apply method)
have Apply(
"github.com/leanote/leanote/vendor/github.com/revel/revel".Request, "github.com/leanote/leanote/vendor/github.com/revel/revel".Response)
want Apply(
"github.com/revel/revel".Request, *"github.com/revel/revel".Response)
vendor\leanote\app\controllers\admin\AdminData.go:55:21: too many errors

leanote/vendor/leanote/app/controllers

vendor\leanote\app\controllers\AlbumController.go:36:10: cannot use "gopkg.in/mgo.v2/bson".NewObjectId() (type "gopkg.in/mgo.v2/bson".ObjectId) as type "github.com/leanote/leanote/vendor/gopkg.in/mgo.v2/bson".ObjectId in field value
vendor\leanote\app\controllers\AlbumController.go:39:9: cannot use c.BaseController.GetObjectUserId() (type "gopkg.in/mgo.v2/bson".ObjectId) as type "github.com/leanote/leanote/vendor/gopkg.in/mgo.v2/bson".ObjectId in field value
vendor\leanote\app\controllers\AttachController.go:102:9: cannot use "gopkg.in/mgo.v2/bson".ObjectIdHex(noteId) (type "gopkg.in/mgo.v2/bson".ObjectId) as type "github.com/leanote/leanote/vendor/gopkg.in/mgo.v2/bson".ObjectId in field value
vendor\leanote\app\controllers\AttachController.go:103:15: cannot use c.BaseController.GetObjectUserId() (type "gopkg.in/mgo.v2/bson".ObjectId) as type "github.com/leanote/leanote/vendor/gopkg.in/mgo.v2/bson".ObjectId in field value
vendor\leanote\app\controllers\AttachController.go:109:20: cannot use id (type "gopkg.in/mgo.v2/bson".ObjectId) as type "github.com/leanote/leanote/vendor/gopkg.in/mgo.v2/bson".ObjectId in assignment
vendor\leanote\app\controllers\BlogController.go:64:28: cannot use blog.RenderTemplate(templateName, c.BaseController.Controller.ViewArgs, "github.com/revel/revel".BasePath + "/" + themePath, isPreview) (type "github.com/leanote/leanote/vendor/github.com/revel/revel".Result) as type "github.com/revel/revel".Result in return argument:
"github.com/leanote/leanote/vendor/github.com/revel/revel".Result does not implement "github.com/revel/revel".Result (wrong type for Apply method)
have Apply(*"github.com/leanote/leanote/vendor/github.com/revel/revel".Request, "github.com/leanote/leanote/vendor/github.com/revel/revel".Response)
want Apply(
"github.com/revel/revel".Request, *"github.com/revel/revel".Response)
vendor\leanote\app\controllers\FileController.go:201:18: cannot use id (type "gopkg.in/mgo.v2/bson".ObjectId) as type "github.com/leanote/leanote/vendor/gopkg.in/mgo.v2/bson".ObjectId in assignment
vendor\leanote\app\controllers\FileController.go:286:18: cannot use id (type "gopkg.in/mgo.v2/bson".ObjectId) as type "github.com/leanote/leanote/vendor/gopkg.in/mgo.v2/bson".ObjectId in assignment
vendor\leanote\app\controllers\IndexController.go:36:76: cannot use c.BaseController.GetObjectUserId() (type "gopkg.in/mgo.v2/bson".ObjectId) as type "github.com/leanote/leanote/vendor/gopkg.in/mgo.v2/bson".ObjectId in field value
vendor\leanote\app\controllers\NoteController.go:187:27: cannot use userId (type "gopkg.in/mgo.v2/bson".ObjectId) as type "github.com/leanote/leanote/vendor/gopkg.in/mgo.v2/bson".ObjectId in field value

liuyp2003 commented Mar 12, 2018

删掉问题更加多。大神,你们先down项目下去,重现下问题研究下。

leanote/vendor/leanote/app/controllers/admin

vendor\leanote\app\controllers\admin\AdminBlogController.go:23:25: cannot use c.AdminBaseController.BaseController.Controller.RenderTemplate("admin/blog/list.html") (type "github.com/leanote/leanote/vendor/github.com/revel/revel".Result) as type "github.com/revel/revel".Result in return argument:
"github.com/leanote/leanote/vendor/github.com/revel/revel".Result does not implement "github.com/revel/revel".Result (wrong type for Apply method)
have Apply(*"github.com/leanote/leanote/vendor/github.com/revel/revel".Request, "github.com/leanote/leanote/vendor/github.com/revel/revel".Response)
want Apply(
"github.com/revel/revel".Request, "github.com/revel/revel".Response)
vendor\leanote\app\controllers\admin\AdminBlogController.go:29:21: cannot use c.AdminBaseController.BaseController.Controller.RenderJSON(re) (type "github.com/leanote/leanote/vendor/github.com/revel/revel".Result) as type "github.com/revel/revel".Result in return argument:
"github.com/leanote/leanote/vendor/github.com/revel/revel".Result does not implement "github.com/revel/revel".Result (wrong type for Apply method)
have Apply(
"github.com/leanote/leanote/vendor/github.com/revel/revel".Request, "github.com/leanote/leanote/vendor/github.com/revel/revel".Response)
want Apply(
"github.com/revel/revel".Request, "github.com/revel/revel".Response)
vendor\leanote\app\controllers\admin\AdminController.go:24:25: cannot use c.AdminBaseController.BaseController.Controller.RenderTemplate("admin/index.html") (type "github.com/leanote/leanote/vendor/github.com/revel/revel".Result) as type "github.com/revel/revel".Result in return argument:
"github.com/leanote/leanote/vendor/github.com/revel/revel".Result does not implement "github.com/revel/revel".Result (wrong type for Apply method)
have Apply(
"github.com/leanote/leanote/vendor/github.com/revel/revel".Request, "github.com/leanote/leanote/vendor/github.com/revel/revel".Response)
want Apply(
"github.com/revel/revel".Request, "github.com/revel/revel".Response)
vendor\leanote\app\controllers\admin\AdminController.go:34:25: cannot use c.AdminBaseController.BaseController.Controller.RenderTemplate("admin/" + t + ".html") (type "github.com/leanote/leanote/vendor/github.com/revel/revel".Result) as type "github.com/revel/revel".Result in return argument:
"github.com/leanote/leanote/vendor/github.com/revel/revel".Result does not implement "github.com/revel/revel".Result (wrong type for Apply method)
have Apply(
"github.com/leanote/leanote/vendor/github.com/revel/revel".Request, "github.com/leanote/leanote/vendor/github.com/revel/revel".Response)
want Apply(
"github.com/revel/revel".Request, "github.com/revel/revel".Response)
vendor\leanote\app\controllers\admin\AdminController.go:38:25: cannot use c.AdminBaseController.BaseController.Controller.RenderTemplate("admin/" + view) (type "github.com/leanote/leanote/vendor/github.com/revel/revel".Result) as type "github.com/revel/revel".Result in return argument:
"github.com/leanote/leanote/vendor/github.com/revel/revel".Result does not implement "github.com/revel/revel".Result (wrong type for Apply method)
have Apply(
"github.com/leanote/leanote/vendor/github.com/revel/revel".Request, "github.com/leanote/leanote/vendor/github.com/revel/revel".Response)
want Apply(
"github.com/revel/revel".Request, "github.com/revel/revel".Response)
vendor\leanote\app\controllers\admin\AdminData.go:30:25: cannot use c.AdminBaseController.BaseController.Controller.RenderTemplate("admin/data/index.html") (type "github.com/leanote/leanote/vendor/github.com/revel/revel".Result) as type "github.com/revel/revel".Result in return argument:
"github.com/leanote/leanote/vendor/github.com/revel/revel".Result does not implement "github.com/revel/revel".Result (wrong type for Apply method)
have Apply(
"github.com/leanote/leanote/vendor/github.com/revel/revel".Request, "github.com/leanote/leanote/vendor/github.com/revel/revel".Response)
want Apply(
"github.com/revel/revel".Request, "github.com/revel/revel".Response)
vendor\leanote\app\controllers\admin\AdminData.go:36:21: cannot use c.AdminBaseController.BaseController.Controller.RenderJSON(re) (type "github.com/leanote/leanote/vendor/github.com/revel/revel".Result) as type "github.com/revel/revel".Result in return argument:
"github.com/leanote/leanote/vendor/github.com/revel/revel".Result does not implement "github.com/revel/revel".Result (wrong type for Apply method)
have Apply(
"github.com/leanote/leanote/vendor/github.com/revel/revel".Request, "github.com/leanote/leanote/vendor/github.com/revel/revel".Response)
want Apply(
"github.com/revel/revel".Request, "github.com/revel/revel".Response)
vendor\leanote\app\controllers\admin\AdminData.go:43:21: cannot use c.AdminBaseController.BaseController.Controller.RenderJSON(re) (type "github.com/leanote/leanote/vendor/github.com/revel/revel".Result) as type "github.com/revel/revel".Result in return argument:
"github.com/leanote/leanote/vendor/github.com/revel/revel".Result does not implement "github.com/revel/revel".Result (wrong type for Apply method)
have Apply(
"github.com/leanote/leanote/vendor/github.com/revel/revel".Request, "github.com/leanote/leanote/vendor/github.com/revel/revel".Response)
want Apply(
"github.com/revel/revel".Request, "github.com/revel/revel".Response)
vendor\leanote\app\controllers\admin\AdminData.go:49:21: cannot use c.AdminBaseController.BaseController.Controller.RenderJSON(re) (type "github.com/leanote/leanote/vendor/github.com/revel/revel".Result) as type "github.com/revel/revel".Result in return argument:
"github.com/leanote/leanote/vendor/github.com/revel/revel".Result does not implement "github.com/revel/revel".Result (wrong type for Apply method)
have Apply(
"github.com/leanote/leanote/vendor/github.com/revel/revel".Request, "github.com/leanote/leanote/vendor/github.com/revel/revel".Response)
want Apply(
"github.com/revel/revel".Request, "github.com/revel/revel".Response)
vendor\leanote\app\controllers\admin\AdminData.go:55:21: cannot use c.AdminBaseController.BaseController.Controller.RenderJSON(re) (type "github.com/leanote/leanote/vendor/github.com/revel/revel".Result) as type "github.com/revel/revel".Result in return argument:
"github.com/leanote/leanote/vendor/github.com/revel/revel".Result does not implement "github.com/revel/revel".Result (wrong type for Apply method)
have Apply(
"github.com/leanote/leanote/vendor/github.com/revel/revel".Request, "github.com/leanote/leanote/vendor/github.com/revel/revel".Response)
want Apply(
"github.com/revel/revel".Request, *"github.com/revel/revel".Response)
vendor\leanote\app\controllers\admin\AdminData.go:55:21: too many errors

leanote/vendor/leanote/app/controllers

vendor\leanote\app\controllers\AlbumController.go:36:10: cannot use "gopkg.in/mgo.v2/bson".NewObjectId() (type "gopkg.in/mgo.v2/bson".ObjectId) as type "github.com/leanote/leanote/vendor/gopkg.in/mgo.v2/bson".ObjectId in field value
vendor\leanote\app\controllers\AlbumController.go:39:9: cannot use c.BaseController.GetObjectUserId() (type "gopkg.in/mgo.v2/bson".ObjectId) as type "github.com/leanote/leanote/vendor/gopkg.in/mgo.v2/bson".ObjectId in field value
vendor\leanote\app\controllers\AttachController.go:102:9: cannot use "gopkg.in/mgo.v2/bson".ObjectIdHex(noteId) (type "gopkg.in/mgo.v2/bson".ObjectId) as type "github.com/leanote/leanote/vendor/gopkg.in/mgo.v2/bson".ObjectId in field value
vendor\leanote\app\controllers\AttachController.go:103:15: cannot use c.BaseController.GetObjectUserId() (type "gopkg.in/mgo.v2/bson".ObjectId) as type "github.com/leanote/leanote/vendor/gopkg.in/mgo.v2/bson".ObjectId in field value
vendor\leanote\app\controllers\AttachController.go:109:20: cannot use id (type "gopkg.in/mgo.v2/bson".ObjectId) as type "github.com/leanote/leanote/vendor/gopkg.in/mgo.v2/bson".ObjectId in assignment
vendor\leanote\app\controllers\BlogController.go:64:28: cannot use blog.RenderTemplate(templateName, c.BaseController.Controller.ViewArgs, "github.com/revel/revel".BasePath + "/" + themePath, isPreview) (type "github.com/leanote/leanote/vendor/github.com/revel/revel".Result) as type "github.com/revel/revel".Result in return argument:
"github.com/leanote/leanote/vendor/github.com/revel/revel".Result does not implement "github.com/revel/revel".Result (wrong type for Apply method)
have Apply(*"github.com/leanote/leanote/vendor/github.com/revel/revel".Request, "github.com/leanote/leanote/vendor/github.com/revel/revel".Response)
want Apply(
"github.com/revel/revel".Request, *"github.com/revel/revel".Response)
vendor\leanote\app\controllers\FileController.go:201:18: cannot use id (type "gopkg.in/mgo.v2/bson".ObjectId) as type "github.com/leanote/leanote/vendor/gopkg.in/mgo.v2/bson".ObjectId in assignment
vendor\leanote\app\controllers\FileController.go:286:18: cannot use id (type "gopkg.in/mgo.v2/bson".ObjectId) as type "github.com/leanote/leanote/vendor/gopkg.in/mgo.v2/bson".ObjectId in assignment
vendor\leanote\app\controllers\IndexController.go:36:76: cannot use c.BaseController.GetObjectUserId() (type "gopkg.in/mgo.v2/bson".ObjectId) as type "github.com/leanote/leanote/vendor/gopkg.in/mgo.v2/bson".ObjectId in field value
vendor\leanote\app\controllers\NoteController.go:187:27: cannot use userId (type "gopkg.in/mgo.v2/bson".ObjectId) as type "github.com/leanote/leanote/vendor/gopkg.in/mgo.v2/bson".ObjectId in field value

@lealife

This comment has been minimized.

Show comment
Hide comment
@lealife

lealife Mar 12, 2018

Member

我们本地都是好的, 不然开发都成问题了.
麻烦这样试下:

  1. 直接下载leanote-all https://github.com/leanote/leanote-all/archive/master.zip
  2. 然后删除vendor文件夹
Member

lealife commented Mar 12, 2018

我们本地都是好的, 不然开发都成问题了.
麻烦这样试下:

  1. 直接下载leanote-all https://github.com/leanote/leanote-all/archive/master.zip
  2. 然后删除vendor文件夹
@liuyp2003

This comment has been minimized.

Show comment
Hide comment
@liuyp2003

liuyp2003 Mar 12, 2018

你们本地的肯定没有问题,但是不代表github上面的代码没有问题。我还是那个建议,你们把github上面的代码down下来,额外跑一下。

你刚才说的这个方法我再试试吧。

liuyp2003 commented Mar 12, 2018

你们本地的肯定没有问题,但是不代表github上面的代码没有问题。我还是那个建议,你们把github上面的代码down下来,额外跑一下。

你刚才说的这个方法我再试试吧。

@liuyp2003

This comment has been minimized.

Show comment
Hide comment
@liuyp2003

liuyp2003 Mar 12, 2018

万幸,可以了。非常感谢!
但是,如果依旧还是要用Vendor管理项目依赖包的话,应该怎么操作呢?

liuyp2003 commented Mar 12, 2018

万幸,可以了。非常感谢!
但是,如果依旧还是要用Vendor管理项目依赖包的话,应该怎么操作呢?

@lealife

This comment has been minimized.

Show comment
Hide comment
@lealife

lealife Mar 12, 2018

Member

果然是vendor的问题, 我们再看看怎么解决.
多谢你不嫌麻烦调试.

Member

lealife commented Mar 12, 2018

果然是vendor的问题, 我们再看看怎么解决.
多谢你不嫌麻烦调试.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment