Giter VIP home page Giter VIP logo

Comments (5)

aofei avatar aofei commented on June 1, 2024

This looks like a fine program, so it should work fine too.

What command did you execute? It should be noted that not all commands will cause the cache to be generated.

Try this one:

$ GOPROXY=http://localhost:8080 go get golang.org/x/[email protected]

from goproxy.

aofei avatar aofei commented on June 1, 2024

Or you can make a request:

$ curl -i http://localhost:8080/golang.org/x/text/@v/v0.3.5.info

from goproxy.

zitn avatar zitn commented on June 1, 2024

What command did you execute? It should be noted that not all commands will cause the cache to be generated.

my go env

GO111MODULE="on"
GOARCH="amd64"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPRIVATE=""
GOPROXY="http://10.0.10.21:8080"
GOROOT="/usr/local/Cellar/go/1.15.7_1/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.15.7_1/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="0"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"

then i use resty and goproxy to test proxy

go get -u github.com/go-resty/resty/v2
go get -u github.com/goproxy/goproxy

Try this one:

$ GOPROXY=http://localhost:8080 go get golang.org/x/[email protected]

log:

goproxy[3548]: 2021/02/19 23:19:55 not found: golang.org is a known non-module
goproxy[3548]: 2021/02/19 23:19:55 not found: golang.org/x is a known non-module
goproxy[3548]: 2021/02/19 23:20:04 not found: golang.org is a known non-module
goproxy[3548]: 2021/02/19 23:20:04 not found: golang.org/x is a known non-module

from goproxy.

zitn avatar zitn commented on June 1, 2024

Or you can make a request:

$ curl -i http://localhost:8080/golang.org/x/text/@v/v0.3.5.info
HTTP/1.1 200 OK
Accept-Ranges: bytes
Cache-Control: public, max-age=604800
Content-Length: 50
Content-Type: application/json; charset=utf-8
Etag: "8VMi8M2xesWHRSHnyHLPjA=="
Last-Modified: Fri, 19 Feb 2021 14:57:31 GMT
Date: Fri, 19 Feb 2021 15:20:25 GMT

{"Version":"v0.3.5","Time":"2020-12-08T00:13:44Z"}

thanks for your time.

from goproxy.

aofei avatar aofei commented on June 1, 2024

Yep, the outputs are correct, and you should be able to find the caches in that path you specified.

from goproxy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.