github.com/traefik/yaegi@v0.15.1/_test/server.go (about)

     1  package main
     2  
     3  import (
     4  	"fmt"
     5  	"net/http"
     6  )
     7  
     8  var v string = "v1.0"
     9  
    10  func main() {
    11  	a := "hello "
    12  	http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
    13  		fmt.Fprint(w, "Welcome to my website! ", a, v)
    14  	})
    15  
    16  	http.ListenAndServe(":8080", nil)
    17  }