hellomanjo

command
v0.0.0-...-70b045a Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2018 License: MIT Imports: 2 Imported by: 0

README

package main

import (
	"fmt"
	"net/http"
	"net/url"
)

func handler(w http.ResponseWriter, r *http.Request) {
	u := r.URL
	m, _ := url.ParseQuery(u.RawQuery)
	value, ok := m["user"]
	if ok {
		fmt.Fprintf(w, "hello %s.\n", value[0])
	}
}

func main() {
	http.HandleFunc("/", handler)
	http.ListenAndServe(":8800", nil)
}

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