rubinliudongpo / airad Goto Github PK
View Code? Open in Web Editor NEWBeego based Restful API service
Beego based Restful API service
utils/jwt.go 中
func init() { appConf, err := config.NewConfig("ini", "conf/app.conf") if err != nil { panic(err) } verifyKey = appConf.String("jwt::token") }
这个jwt::token 是什么意思?双冒号?
2018/04/13 11:51:00 INFO ▶ 0009 |> 2018/04/13 11:50:58.565 [E] execute error : Error 1064: You have an error in your SQL syntax; check the manual that corres ponds to your MariaDB server version for the right syntax to use near 'ADD so2 v archar(10)' at line 1
错误位置:
20171109_164549_airad.go 23行, 末尾 缺少一个逗号.
`// Run the migrations
func (m *AirAd_20171109_164549) Up() {
m.SQL("ALTER TABLE air_ad ADD createdAt int, ADD nh3 varchar(10), " +
"ADD co varchar(10), ADD pm25 varchar(10), ADD pm10 varchar(10), ADD o3 varchar(10)" +
"ADD so2 varchar(10)")
}`
`// Run the migrations
func (m *AirAd_20171109_164549) Up() {
m.SQL("ALTER TABLE air_ad ADD createdAt int, ADD nh3 varchar(10), " +
"ADD co varchar(10), ADD pm25 varchar(10), ADD pm10 varchar(10), ADD o3 varchar(10)," +
"ADD so2 varchar(10)")
}`
首先说一下我是个新手,我遇到的问题是,这里很多 import 依赖的方式都是
import (
_ "github.com/rubinliudongpo/airad/routers"
"github.com/rubinliudongpo/airad/utils"
"github.com/astaxie/beego"
"github.com/rubinliudongpo/airad/controllers"
)
类似于这样的。。
为啥不是
import (
_ "airad/routers"
"airad/utils"
"github.com/astaxie/beego"
"airad/controllers"
)
这样的绝对路径的方式来 import , 因为貌似看的几个 beego 项目里都是绝对路径的形式,而且貌似 idea 里面使用 github.com/xxx/yyy
这样的路径,会默认打开 GOPATH
里面的(airad项目下的)文件
[ORM]2018/11/23 16:21:16 register db Ping default
, Error 1044: Access denied for user 'gouser'@'%' to database 'airad'
must have one register DataBase alias named default
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.