From 0317072137d6296abdeae51cb938bb3b8f5070fa Mon Sep 17 00:00:00 2001 From: lyric Date: Wed, 13 Jun 2018 14:59:44 +0800 Subject: [PATCH] update import path --- .travis.yml | 10 +++++++--- README.md | 22 ++++++++++------------ redis.go | 2 +- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 965fead..e69bce2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,15 @@ language: go sudo: false -go_import_path: gopkg.in/go-session/redis.v1 +go_import_path: github.com/go-session/redis go: - 1.7 services: - redis-server before_install: - - go get github.com/mattn/goveralls + - go get -t -v ./... + script: - - $HOME/gopath/bin/goveralls -service=travis-ci \ No newline at end of file + - go test -race -coverprofile=coverage.txt -covermode=atomic + +after_success: + - bash <(curl -s https://codecov.io/bash) \ No newline at end of file diff --git a/README.md b/README.md index f46901a..6d3fae5 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ # Redis store for [Session](https://github.com/go-session/session) -[![Build][Build-Status-Image]][Build-Status-Url] [![Coverage][Coverage-Image]][Coverage-Url] [![ReportCard][reportcard-image]][reportcard-url] [![GoDoc][godoc-image]][godoc-url] [![License][license-image]][license-url] +[![Build][Build-Status-Image]][Build-Status-Url] [![Codecov][codecov-image]][codecov-url] [![ReportCard][reportcard-image]][reportcard-url] [![GoDoc][godoc-image]][godoc-url] [![License][license-image]][license-url] ## Quick Start ### Download and install ```bash -$ go get -u -v gopkg.in/go-session/redis.v1 +$ go get -u -v github.com/go-session/redis ``` ### Create file `server.go` @@ -20,14 +20,12 @@ import ( "fmt" "net/http" - "gopkg.in/go-session/redis.v1" - "gopkg.in/session.v2" + "github.com/go-session/redis" + "github.com/go-session/session" ) func main() { session.InitManager( - session.SetCookieName("session_id"), - session.SetSign([]byte("sign")), session.SetStore(redis.NewRedisStore(&redis.Options{ Addr: "127.0.0.1:6379", DB: 15, @@ -89,11 +87,11 @@ $ ./server [Build-Status-Url]: https://travis-ci.org/go-session/redis [Build-Status-Image]: https://travis-ci.org/go-session/redis.svg?branch=master -[Coverage-Url]: https://coveralls.io/github/go-session/redis?branch=master -[Coverage-Image]: https://coveralls.io/repos/github/go-session/redis/badge.svg?branch=master -[reportcard-url]: https://goreportcard.com/report/gopkg.in/go-session/redis.v1 -[reportcard-image]: https://goreportcard.com/badge/gopkg.in/go-session/redis.v1 -[godoc-url]: https://godoc.org/gopkg.in/go-session/redis.v1 -[godoc-image]: https://godoc.org/gopkg.in/go-session/redis.v1?status.svg +[codecov-url]: https://codecov.io/gh/go-session/redis +[codecov-image]: https://codecov.io/gh/go-session/redis/branch/master/graph/badge.svg +[reportcard-url]: https://goreportcard.com/report/github.com/go-session/redis +[reportcard-image]: https://goreportcard.com/badge/github.com/go-session/redis +[godoc-url]: https://godoc.org/github.com/go-session/redis +[godoc-image]: https://godoc.org/github.com/go-session/redis?status.svg [license-url]: http://opensource.org/licenses/MIT [license-image]: https://img.shields.io/npm/l/express.svg diff --git a/redis.go b/redis.go index 0b322f4..4e7701f 100644 --- a/redis.go +++ b/redis.go @@ -6,8 +6,8 @@ import ( "time" "github.com/go-redis/redis" + "github.com/go-session/session" "github.com/json-iterator/go" - "gopkg.in/session.v2" ) var (