This file is website/baz/bob.en.md
.
Tag is v0.0.1
.
Prj is aileron-example
.
Date is ${date}
.
Images should go in the bob/
folder.
It can be embedded with file name without folder name bob/
.
1package main
2
3import (
4 "fmt"
5 "log"
6 "net/http"
7)
8
9func handler(w http.ResponseWriter, r *http.Request) {
10 fmt.Fprintf(w, "Hello, World!")
11}
12
13// START main
14func main() {
15 http.HandleFunc("/", handler)
16
17 fmt.Println("Starting server at :8082")
18 err := http.ListenAndServe(":8082", nil)
19 if err != nil {
20 log.Fatalf("Server failed to start: %v", err)
21 }
22}
23
24// END main
1func main() {
2 http.HandleFunc("/", handler)
3
4 fmt.Println("Starting server at :8082")
5 err := http.ListenAndServe(":8082", nil)
6 if err != nil {
7 log.Fatalf("Server failed to start: %v", err)
8 }
9}
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.