gohttp

package module
v0.0.0-...-34ea516 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2017 License: Apache-2.0 Imports: 15 Imported by: 1

README

gohttp: go simple http server

Golang implementation replace "python -m SimpleHTTPServer"

Usage

$ go get -u github.com/itang/gohttp
$ go install github.com/itang/gohttp/gohttp

$ gohttp --help

$ gohttp
Serving HTTP on 192.168.1.103 port 8080 from "/home/itang/workspace/work" ...

$ gohttp -d=/home -p=9000
Serving HTTP on 192.168.1.128 port 9000 from "/home" ...

License

Distributed under the Apache License Version 2.0.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileServer

type FileServer struct {
	Port    int
	Webroot string
}

func (*FileServer) ServeHTTP

func (fileServer *FileServer) ServeHTTP(w http.ResponseWriter, req *http.Request)

func (*FileServer) Start

func (fileServer *FileServer) Start()

type Item

type Item struct {
	Name  string
	Title string
	URI   string
	Size  int64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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