Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 918 Bytes

README.md

File metadata and controls

17 lines (13 loc) · 918 Bytes

go-get-redirect

This tool allows you to vend your Go packages via a custom domain name. It generates a static website for redirection purposes by scanning a given GitHub account for public Go repos. Current implementation is based around GitHub account and generating a static website using Actions.

This is useful when you don't want to run a server that does the redirection. If you do have a server to run this on, then you could set up something like this with nginx:

location ~ ^/([^/]+).*$ {
	if ($args = "go-get=1") {
		add_header Content-Type text/html;
		return 200 '<meta name="go-import" content="$host/$1 git https://github.com/USERNAME/$1.git">';
	}
	return 302 https://github.com/USERNAME/$1;
}

Additional information about how this works can be found here.