Go vanity domain HTTP handler
Clone or download
kare Release v0.2.0
    - Add support for configurable package logger
    - Support Go 1.11 Modules
Latest commit 298bd3c Nov 9, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ci Use Go 1.11 Modules and fix Travis build Nov 8, 2018
.gitignore Add empty .gitignore Oct 20, 2016
.travis.yml Update Travis build Nov 8, 2018
CHANGELOG.md Release v0.2.0 Nov 8, 2018
LICENSE Add LICENSE Oct 20, 2016
Makefile Makefile: Fix lint Jan 11, 2018
README.md Release v0.2.0 Nov 8, 2018
example_test.go Fix Examples Nov 8, 2018
go.mod Use Go 1.11 Modules and fix Travis build Nov 8, 2018
vanity.go Improve error handling readability Nov 8, 2018
vanity_test.go Use httptest.NewRequest in tests Nov 8, 2018

README.md

Vanity Build Status GoDoc

Concepts

  • VCS is Version Control System (such as Git or Mercurial)
  • VCS root is the root path the source code repository (such as github.com/kare)
  • Domain is the internet address where the Go Vanity server is hosted (such as 9fans.net or kkn.fi)
  • Path is the path component of the Go package (such as /cmd/tcpproxy in kkn.fi/cmd/tcpproxy)

Features

  • Redirects browsers to godoc.org
  • Redirects Go tool to VCS
  • Redirects HTTP to HTTPS
  • Automatic configuration of packages:
    • All packages are redirected with full path to vcsroot.
    • Packages whose path is prefixed with "/cmd/" redirect automatically to vcsroot by stripping the "/cmd" prefix from the package path. Example: Redirect request "kkn.fi/cmd/tcpproxy" to "github.com/kare/tcpproxy"
  • Configurable logger which is fully compatible with standard log package

Installation

go get kkn.fi/vanity

Specification