github.com/cellofellow/gopkg@v0.0.0-20140722061823-eec0544a62ad/web/examples/hello.go (about)

     1  // Copyright 2014 <chaishushan{AT}gmail.com>. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // +build ingore
     6  
     7  package main
     8  
     9  import (
    10  	"github.com/chai2010/gopkg/web"
    11  )
    12  
    13  func hello(val string) string {
    14  	return "hello " + val
    15  }
    16  
    17  func main() {
    18  	web.Get("/(.*)", hello)
    19  	web.Run("0.0.0.0:9999")
    20  }