go-remote-redir

command module
v0.0.0-...-f054f77 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2016 License: MIT Imports: 6 Imported by: 0

README

go-remote-redir

go-remote-redir implements a http server to support go remote import paths.

Build Status Widget Coverage Status Widget Code Climate Widget MicroBadger Image Widget

Usage

Usage:
  go-remote-redir [OPTIONS]

Application Options:
      --listen=        address to listen on (default: 0.0.0.0:8080) [$GRR_LISTEN]
      --pattern=       path pattern (default: /p/(?P<user>[^/]+)/(?P<project>[^/]+).*) [$GRR_PATTERN]
      --meta=          meta tag content for go remote import feature (default: example.io/p/${user}/${project} git ssh://git@gitlab.com/${user}/${project}.git) [$GRR_META]
      --redirect-name= redirect name (default: Gitlab Project Page) [$GRR_REDIRECT_NAME]
      --redirect-to=   redirect to (default: https://gitlab.com/${user}/${project}) [$GRR_REDIRECT_TO]
  -v, --version        show version number

Help Options:
  -h, --help           Show this help message

Example

docker run -p 8080:8080 wikiwi/go-remote-redir

Output

curl localhost:8080/p/user/project?go-get=1
<html>
        <head>
                <title>Go Remote Packages</title>
                <meta name="go-import" content="example.io/p/user/project git ssh://git@gitlab.com/user/project.git">
                <meta http-equiv="refresh" content="0; url=https://gitlab.com/user/project">
                <meta name="robots" content="noindex">
        </head>
        <body>
                You are being automatically redirected to <a href="https://gitlab.com/user/project">Gitlab Project Page</a>.
        </body>
</html>

Docker Hub

Automated build is available at the Docker Hub.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL