Giter VIP home page Giter VIP logo

vanity's Introduction

kkn.fi/vanity

CI Go Reference GoReportCard

Concepts

  • VCS is Version Control System (such as 'git')
  • Repo root is the root path the source code repository (such as 'https://github.com/kare')
  • Domain is the internet address where the Go Vanity server is hosted (such as 9fans.net or kkn.fi). Domain is deduced from HTTP request.
  • Path is the path component of the Go package (such as /cmd/tcpproxy in kkn.fi/cmd/tcpproxy)

Specification

Features

  • Redirects Go tool to VCS
  • Redirects browsers to pkg.go.dev module server by default. Module Server URL is configurable.
  • Module server URL options are:
  • Hostname defaults to request host, but it can also be configured.
  • Automatic configuration of cmd packages:
    • All packages are redirected without sub-packages 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" Example: Redirect request "kkn.fi/project/sub/package" to "github.com/kare/project"
  • Configurable logger which is compatible with standard log package. Default output goes to stderr.
  • Supports index HTML file in the domain root and configurable static content directory (for images, CSS, and etc).
  • Supports robots.txt file

Installation

go get kkn.fi/vanity

Development

Run all tests

make test

Run short (unit) tests

make test-unit

Run long (integration) tests

make test-integration

Run goimports

make goimports

Run staticcheck

make staticcheck

Run gofmt with simplify

make fmt

vanity's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.