Socket
Socket
Sign inDemoInstall

jsouthworth.net/go/go-import-redirector

Package Overview
Dependencies
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    jsouthworth.net/go/go-import-redirector

Go-import-redirector is an HTTP server for a custom Go import domain. It responds to requests in a given import path root with a meta tag specifying the source repository for the “go get” command and an HTML redirect to the godoc.org documentation page for that package. Usage: Go-import-redirector listens on address (default “:80”) and responds to requests for URLs in the given import path root with one meta tag specifying the given source repository for “go get” and another meta tag causing a redirect to the corresponding godoc.org documentation page. For example, if invoked as: then the response for 9fans.net/go/acme/editinacme will include these tags: If both <import> and <repo> end in /*, the corresponding path element is taken from the import path and substituted in repo on each request. For example, if invoked as: then the response for rsc.io/x86/x86asm will include these tags: Note that the wildcard element (x86) has been included in the Git repo path. The -addr option specifies the HTTP address to serve (default “:http”). The -tls option causes go-import-redirector to serve HTTPS on port 443, loading an X.509 certificate and key pair from files in the current directory named after the host in the import path with .crt and .key appended (for example, rsc.io.crt and rsc.io.key). Like for http.ListenAndServeTLS, the certificate file should contain the concatenation of the server's certificate and the signing certificate authority's certificate. The -vcs option specifies the version control system, git, hg, or svn (default “git”). For the case of a redirector for an entire domain (such as rsc.io above), the Makefile in this directory contains recipes to deploy a trivial VM running just this program, using a static IP address that can be loaded into the DNS configuration for the target domain.


Version published

Readme

Source

go get [-u] rsc.io/go-import-redirector https://godoc.org/rsc.io/go-import-redirector

FAQs

Last updated on 19 Jun 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc