vanityserver

package
v0.0.0-...-d2a4ff1 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

VanityServer implements an HTTP.Handler that redirects HTTP requests to projects hosted on sourcehut. Example usage:

import (
	"net/http"
	"ben.gmbh/sourcehut-vanity/vanityserver"
)
func main() {
	http.ListenAndServe(port, vanityserver.VanityServer{Username: "blowry"})
}

SPDX-License-Identifier: GPL-3.0-or-later

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VanityServer

type VanityServer struct {
	Username string
	Branch   string
}

func (VanityServer) ServeHTTP

func (server VanityServer) ServeHTTP(rw http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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