Skip to content

Instantly share code, notes, and snippets.

@IndianGuru
Last active September 21, 2015 08:28
Show Gist options
  • Select an option

  • Save IndianGuru/54c1b96d69e66272f686 to your computer and use it in GitHub Desktop.

Select an option

Save IndianGuru/54c1b96d69e66272f686 to your computer and use it in GitHub Desktop.
geowebgap.go
package geowebgap
import (
"fmt"
"net/http"
)
func init() {
http.HandleFunc("/", handler)
}
func handler(w http.ResponseWriter, r *http.Request) {
fmt.Fprint(w, rootForm)
}
const rootForm = `
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Accept Address</title>
</head>
<body>
<h1>Accept Address</h1>
<p>Please enter your address:</p>
<form action="" method="post" accept-charset="utf-8">
<input type="text" name="str" value="Type address..." id="str">
<input type="submit" value=".. and see the image!">
</form>
</body>
</html>
`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment