hal_browser

package module
v0.0.0-...-00f745a Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2015 License: Apache-2.0 Imports: 3 Imported by: 0

README

Go HAL-browser

A Go http.Handler that serves up a statically compiled version of Mike Kelly's HAL-browser.

Build Status

Examples

package main

import "net/http"
import "github.com/cbandy/go-hal_browser"

func main() {
	// To serve the HAL-browser at "/browser.html"
	http.Handle("/", hal_browser.Handler)
}
	// To serve the HAL-browser at "/explore.html"
	http.Handle("/", hal_browser.At("/explore.html"))
	// To serve the HAL-browser at "/explorer/browser.html"
	http.Handle("/explorer/", http.StripPrefix("/explorer", hal_browser.Handler))
	// To serve the HAL-browser at "/explorer/"
	http.Handle("/explorer/", http.StripPrefix("/explorer", hal_browser.At("/")))

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Handler = http.FileServer(&assetfs.AssetFS{
	Asset: asset.Asset, AssetDir: asset.AssetDir,
})

Functions

func At

func At(path string) http.Handler

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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