瀏覽代碼

Merge pull request #724 from chiffa-org/redundant_context_import

Move golang.org/x/net/context.Context interface implementation check to tests
Javier Provecho Fernandez 9 年之前
父節點
當前提交
273e43a27a
共有 2 個文件被更改,包括 3 次插入3 次删除
  1. 0 3
      context.go
  2. 3 0
      context_test.go

+ 0 - 3
context.go

@@ -17,7 +17,6 @@ import (
 	"github.com/gin-gonic/gin/binding"
 	"github.com/gin-gonic/gin/render"
 	"github.com/manucorporat/sse"
-	"golang.org/x/net/context"
 )
 
 // Content-Type MIME of the most common data formats
@@ -50,8 +49,6 @@ type Context struct {
 	Accepted []string
 }
 
-var _ context.Context = &Context{}
-
 /************************************/
 /********** CONTEXT CREATION ********/
 /************************************/

+ 3 - 0
context_test.go

@@ -17,8 +17,11 @@ import (
 
 	"github.com/manucorporat/sse"
 	"github.com/stretchr/testify/assert"
+	"golang.org/x/net/context"
 )
 
+var _ context.Context = &Context{}
+
 // Unit tests TODO
 // func (c *Context) File(filepath string) {
 // func (c *Context) Negotiate(code int, config Negotiate) {