Comments (9)
你好,我也遇到一样的问题,请问解决了吗?
from studygolang.
@duanjunxiao 到代码里去删除/
from studygolang.
我这的代码没有多 / 呀,你代码是最新的吗?
from studygolang.
昨天拉下来的。go version go1.8.3 darwin/amd64 , macos 10.12.6, 代码里面import我都去手动改好才能运行 ,"http/middleware" ,需要我手动加studygolang/src/
from studygolang.
受到加这个是什么意思?还有这样的事情?
from studygolang.
我刚拉了份最新的源码,运行完getpkg.sh和install.sh后 在src/studygolang目录下运行main.go会报错。
go run main.go
main.go:10:2: cannot find package "global" in any of:
/Users/lintao/Documents/Code/GO/src/studygolang/src/vendor/global (vendor tree)
/usr/local/go/src/global (from $GOROOT)
/Users/lintao/Documents/Code/GO/src/global (from $GOPATH)
main.go:11:2: cannot find package "http/controller" in any of:
/Users/lintao/Documents/Code/GO/src/studygolang/src/vendor/http/controller (vendor tree)
/usr/local/go/src/http/controller (from $GOROOT)
我加上完整路径后才能编译通过,我GOROOT环境变量就是设置在Code/GO文件夹下
"studygolang/src/http/controller/admin"
const mainIniPath = "/config/env.ini"
需要去掉前面的/不然有路径问题。
from studygolang.
要手动加是goimports,gofmt都不起作用。。。
from studygolang.
install.sh 后,为啥执行 go run main.go ,应该执行 bin/studygolang
from studygolang.
根据和大神@polaris1119的沟通,studygolang是一个独立的项目,不可以放到$GOPATH下的src目录下,修改后就可以运行了
from studygolang.
Related Issues (20)
- 内容过少时,底部的二维码去掉
- 评论加上点赞功能,排序调整,赞最多、最新的在上面
- 不能从main.go启动吗
- 头像高度没有限制,导致在文章列表的高度显示异常
- 搜索时出现空白页面,错误日志提示 error: parsing time
- 新建项目时,如果 uri 不填会有bug
- 登录不进去 HOT 1
- 对全站外链进行处理
- github.com/studygolang/studygolang/db 类似的所有的资源全都404 NotFound
- 安装过程问题 HOT 1
- [重要]账号相关 bug HOT 2
- 修改js,css文件,如何调试? HOT 1
- 关于App.Domain信息的提问
- 主题页 XSS 漏洞
- 网站RSS订阅内容不更新
- go mod tidy 报错
- 官网被黑了吧 HOT 1
- Neet
- The vulnerability CVE-2021-4272, CVE-2021-4273 have been fixed, but no specific tag denotes the patched version.
- 希望增加微信扫码登陆功能
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from studygolang.