The project build with redis,martini, martini-render, mysql and xorm
Install redis ,martini ,martini-render ,mysql and xorm
go get -u github.com/hoisie/redis
go get -u github.com/go-martini/martini
go get -u github.com/martini-contrib/render
go get -u github.com/go-sql-driver/mysql
go get -u github.com/go-xorm/xorm
INSERT INTO mysql.user(Host,User,Password) VALUES ('localhost', 'arkors', password('arkors'));
FLUSH PRIVILEGES;
CREATE DATABASE `arkors_update` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
GRANT ALL PRIVILEGES ON arkors_update.* TO arkors@localhost IDENTIFIED BY 'arkors';
FLUSH PRIVILEGES;
you need to set your mysql root/password and redis's port in program
set mysql in update_test.go
root_db, err := sql.Open("mysql", "root:@/")
set redis in main.go and update_test.go
redisClient.Addr="127.0.0.1:6379"
You might have problem when you run go test second,you must execute the following command.
drop database arkors_update_test
Add CI service with drone.io