Giter Club home page Giter Club logo

frame's Introduction

地址:http://svn.oa.com:24399/flames/go

目录规划如下:

/framework				rpc框架
/github.com				使用到的开源库
/PGLibrary				业务使用到的公共类库,业务自主封装
/PGNotices				公告服务
	/app
		/entity 		DB 表结构(结构体,方便存储数据使用)
		/proto			rpc请求参数和返回值(框架协议必备)
		/controller 	控制器(业务逻辑)
		/service 		model{db,cache}(数据操作)
	/conf  				配置,服务启动相关(也可以抽离到mysql)
/PGSignin				签到服务
	/app
		/entity 		DB 表结构(结构体,方便存储数据使用)
		/proto			rpc请求参数和返回值(框架协议必备)
		/controller 	控制器(业务逻辑)
		/service 		model{db,cache}(数据操作)
	/conf  				配置,服务启动相关(也可以抽离到mysql)

基本执行步骤:
1.linux环境安装go环境。
2.设置GOPATH变量。
3.在$GOPATH/src目录将此目录代码更新下来。
4.服务启动示例,比如公告服务:进入$GOPATH/src目录,直接执行go run PGNotices/main.go。

测试规范,以PGLibrary/ipdata为例:
1.每个功能都需要基准测试和功能测试,ipdata.go对应需要ipdata_test.go测试文件
2.功能测试(执行ipdata_test.go文件的TestIpdata_Find方法):
    cd $GOPATH/src/PGLibrary/ipdata;
    go test
3.基准测试(执行ipdata_test.go文件的BenchmarkIpdata_Find方法):
    cd $GOPATH/src/PGLibrary/ipdata;
    go test -bench=. -benchmem

frame's People

Contributors

yangyangpig avatar

Stargazers

onecoder avatar  avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.