先来看一个简单示例: models.gp package main import ( "github.com/astaxie/beego/orm" ) type User struct { Id int Name string Profile *Profile `orm:"rel(one)"` // OneToOne relation Post []*Post `orm:"reverse(many)"` // 设置一对多的反向关系 } type
github中的 sloc是什么意思? sloc: source lines of code: 代码行数, 源代码行. 要向仓库中 create file/upload file/edit file等操作, 你需要在某个分支上才行: you must be on a certain branch. 在github上 创建/修改/删除 一个文件都是一个 commit 一个节点的 父节点(parent version 父版本) 是指比他 更早的 那个提交 节点. 所以 git节点的表示方法是: a
最近项目组安排将一组Lua实现的web服务端代码重构成Go实现,所以顺便学习了下Lua和Go,这里记录下在尝试重构的过程中遇到的几个问题. 1.beego路由设置 路由设置简单说下,主要是调用了package routers的init()方法 // @APIVersion 1.0.0 // @Title beego Test API // @Description beego has a very cool tools to autogenerate documents for your API
本人总结: 1.问题: fatal: Not a git repository (or any of the parent directories) 解决: 本地库还没有创建,请先用git init 创建本地库再执行相关命令(我执行的是:git remote add origin git@github.com:langtianya/groovy_test.git) 2.问题:error:src refspec master does not match any 解决: 本地版本库为空, 空目录