初始化

This commit is contained in:
Administrator
2024-09-04 16:48:42 +08:00
parent 229b8ca83a
commit 688c516c9f
26 changed files with 126 additions and 1936 deletions

3
cache/cache.go vendored
View File

@ -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
View File

@ -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"

View File

@ -1,9 +1,9 @@
package diskcache
import (
"github.com/geziyor/geziyor/cache"
"io/ioutil"
"os"
"softdown.com/shusou/geziyor/cache"
"testing"
)

View File

@ -1,10 +1,10 @@
package leveldbcache
import (
"github.com/geziyor/geziyor/cache"
"io/ioutil"
"os"
"path/filepath"
"softdown.com/shusou/geziyor/cache"
"testing"
)