8000 GitHub - jrkt/go-import-path: Webserver for custom Go import path
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

jrkt/go-import-path

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

go-import-path

This is to be used as the webserver if you have a custom domain you want to use as your base import path for your Go projects.

usage

Figure out how you want to store the key/value pairs that serve as your router. For simplicity, this example just uses a map. The keys in the map correspond to the request uri (r.RequestURI) in the incoming request, and the vaue represents the target of where that repo should live.

For example, with a custom domain of go.example.com and the router used here:

router = map[string]string{
    "/package1": "https://github.com/jrkt/package1",
    "/package2": "https://github.com/jrkt/package2",
    "/package3": "https://gitlab.com/jrkt/package3",
}
  • go get go.example.com/{package1,package2} would both resolve to github
  • go get go.example.com/package3 would resolve to gitlab.

About

Webserver for custom Go import path

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0