core: Use context package from Go stdlib

This commit is contained in:
Marius 2019-06-11 16:16:02 +02:00
parent 05d9a0ba98
commit 02c5942843
7 changed files with 8 additions and 13 deletions

View File

@ -1,9 +1,8 @@
package tusd package tusd
import ( import (
"context"
"io" "io"
"golang.org/x/net/context"
) )
type MetaData map[string]string type MetaData map[string]string

View File

@ -1,21 +1,20 @@
package gcsstore package gcsstore
import ( import (
"context"
"errors" "errors"
"fmt" "fmt"
"hash/crc32"
"io" "io"
"math" "math"
"strconv" "strconv"
"strings" "strings"
"cloud.google.com/go/storage" "cloud.google.com/go/storage"
"golang.org/x/net/context"
"google.golang.org/api/googleapi" "google.golang.org/api/googleapi"
"google.golang.org/api/iterator" "google.golang.org/api/iterator"
"google.golang.org/api/option" "google.golang.org/api/option"
"hash/crc32"
"github.com/vimeo/go-util/crc32combine" "github.com/vimeo/go-util/crc32combine"
) )

View File

@ -2,7 +2,7 @@ package gcsstore_test
import ( import (
"bytes" "bytes"
"golang.org/x/net/context" "context"
"testing" "testing"
"gopkg.in/h2non/gock.v1" "gopkg.in/h2non/gock.v1"

View File

@ -12,6 +12,7 @@ package gcsstore
import ( import (
"bytes" "bytes"
"context"
"encoding/json" "encoding/json"
"fmt" "fmt"
"io" "io"
@ -20,8 +21,6 @@ import (
"sync" "sync"
"sync/atomic" "sync/atomic"
"golang.org/x/net/context"
"cloud.google.com/go/storage" "cloud.google.com/go/storage"
"github.com/tus/tusd" "github.com/tus/tusd"
"github.com/tus/tusd/uid" "github.com/tus/tusd/uid"

View File

@ -2,12 +2,11 @@ package gcsstore_test
import ( import (
"bytes" "bytes"
"context"
"encoding/json" "encoding/json"
"fmt" "fmt"
"testing" "testing"
"golang.org/x/net/context"
"cloud.google.com/go/storage" "cloud.google.com/go/storage"
"github.com/golang/mock/gomock" "github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"

View File

@ -1,6 +1,7 @@
package tusd package tusd
import ( import (
"context"
"encoding/base64" "encoding/base64"
"errors" "errors"
"io" "io"
@ -14,8 +15,6 @@ import (
"strings" "strings"
"sync/atomic" "sync/atomic"
"time" "time"
"golang.org/x/net/context"
) )
const UploadLengthDeferred = "1" const UploadLengthDeferred = "1"