aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml8
-rw-r--r--README.md13
-rw-r--r--session.go2
-rw-r--r--session_test.go2
4 files changed, 13 insertions, 12 deletions
diff --git a/.travis.yml b/.travis.yml
index fa89548..c732b2b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,6 +4,10 @@ go_import_path: github.com/go-session/echo-session
go:
- 1.9
before_install:
- - go get github.com/mattn/goveralls
+ - go get -t -v ./...
+
script:
- - $HOME/gopath/bin/goveralls -service=travis-ci
+ - go test -race -coverprofile=coverage.txt -covermode=atomic
+
+after_success:
+ - bash <(curl -s https://codecov.io/bash)
diff --git a/README.md b/README.md
index 3b46d4d..5de7baf 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# Session middleware for [Echo](https://github.com/labstack/echo)
-[![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
@@ -21,16 +21,13 @@ import (
"github.com/go-session/echo-session"
"github.com/labstack/echo"
- "gopkg.in/session.v2"
+ "github.com/go-session/session"
)
func main() {
e := echo.New()
- e.Use(echosession.New(
- session.SetCookieName("session_id"),
- session.SetSign([]byte("sign")),
- ))
+ e.Use(echosession.New())
e.GET("/", func(ctx echo.Context) error {
store := echosession.FromContext(ctx)
@@ -75,8 +72,8 @@ $ ./server
[Build-Status-Url]: https://travis-ci.org/go-session/echo-session
[Build-Status-Image]: https://travis-ci.org/go-session/echo-session.svg?branch=master
-[Coverage-Url]: https://coveralls.io/github/go-session/echo-session?branch=master
-[Coverage-Image]: https://coveralls.io/repos/github/go-session/echo-session/badge.svg?branch=master
+[codecov-url]: https://codecov.io/gh/go-session/echo-session
+[codecov-image]: https://codecov.io/gh/go-session/echo-session/branch/master/graph/badge.svg
[reportcard-url]: https://goreportcard.com/report/github.com/go-session/echo-session
[reportcard-image]: https://goreportcard.com/badge/github.com/go-session/echo-session
[godoc-url]: https://godoc.org/github.com/go-session/echo-session
diff --git a/session.go b/session.go
index ea5bbc7..63ae157 100644
--- a/session.go
+++ b/session.go
@@ -4,8 +4,8 @@ import (
"context"
"sync"
+ "github.com/go-session/session"
"github.com/labstack/echo"
- "gopkg.in/session.v2"
)
type (
diff --git a/session_test.go b/session_test.go
index 9aea1c6..855260e 100644
--- a/session_test.go
+++ b/session_test.go
@@ -7,8 +7,8 @@ import (
"net/http/httptest"
"testing"
+ "github.com/go-session/session"
"github.com/labstack/echo"
- "gopkg.in/session.v2"
)
func TestSession(t *testing.T) {