初始化
This commit is contained in:
3
cache/cache.go
vendored
3
cache/cache.go
vendored
@ -11,11 +11,11 @@ import (
|
||||
"bufio"
|
||||
"bytes"
|
||||
"errors"
|
||||
"github.com/geziyor/geziyor/cache/memorycache"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/http/httputil"
|
||||
"softdown.com/shusou/geziyor/cache/memorycache"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
@ -122,7 +122,6 @@ func varyMatches(cachedResp *http.Response, req *http.Request) bool {
|
||||
// RoundTrip is a wrapper for caching requests.
|
||||
// If there is a fresh Response already in cache, then it will be returned without connecting to
|
||||
// the server.
|
||||
//
|
||||
func (t *Transport) RoundTrip(req *http.Request) (resp *http.Response, err error) {
|
||||
if t.Policy == Dummy {
|
||||
return t.RoundTripDummy(req)
|
||||
|
2
cache/cache_test.go
vendored
2
cache/cache_test.go
vendored
@ -4,12 +4,12 @@ import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"flag"
|
||||
"github.com/geziyor/geziyor/cache/memorycache"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"os"
|
||||
"softdown.com/shusou/geziyor/cache/memorycache"
|
||||
"strconv"
|
||||
"testing"
|
||||
"time"
|
||||
|
2
cache/diskcache/diskcache_test.go
vendored
2
cache/diskcache/diskcache_test.go
vendored
@ -1,9 +1,9 @@
|
||||
package diskcache
|
||||
|
||||
import (
|
||||
"github.com/geziyor/geziyor/cache"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"softdown.com/shusou/geziyor/cache"
|
||||
"testing"
|
||||
)
|
||||
|
||||
|
2
cache/leveldbcache/leveldbcache_test.go
vendored
2
cache/leveldbcache/leveldbcache_test.go
vendored
@ -1,10 +1,10 @@
|
||||
package leveldbcache
|
||||
|
||||
import (
|
||||
"github.com/geziyor/geziyor/cache"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"softdown.com/shusou/geziyor/cache"
|
||||
"testing"
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user