[Go] basics and web

This commit is contained in:
2026-03-02 01:47:42 +01:00
parent c88211d161
commit d83f0833ec
11 changed files with 320 additions and 0 deletions

20
slides/go/server.go Normal file
View File

@@ -0,0 +1,20 @@
//go:build exclude
package main
import (
"net/http"
)
func main() {
// web server
http.HandleFunc("/", a )
http.ListenAndServe(":8080", nil)
}
func a(w http.ResponseWriter, r *http.Request){
w.Write([]byte("Hello Web"))
}