Skip to content

Instantly share code, notes, and snippets.

@Poincare
Created December 12, 2013 04:46
Show Gist options
  • Save Poincare/7923298 to your computer and use it in GitHub Desktop.
Save Poincare/7923298 to your computer and use it in GitHub Desktop.
package main
import (
"github.com/hoisie/web"
"fmt"
)
func logName(ctx *web.Context, val string) {
name := ctx.Params["name"]
fmt.Println(name)
ctx.WriteString("Hi, " + name)
}
func main() {
web.Get("/log_name?(.*)", logName)
web.Run("0.0.0.0:9999")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment