Skip to content

Instantly share code, notes, and snippets.

@khannedy
Created April 24, 2022 15:47
Show Gist options
  • Save khannedy/166be48cabb637b5beefc4e7998f2c7e to your computer and use it in GitHub Desktop.
Save khannedy/166be48cabb637b5beefc4e7998f2c7e to your computer and use it in GitHub Desktop.
Go-Lang Hello World
package main
import (
"fmt"
"net/http"
)
func main() {
http.HandleFunc("/", HelloServer)
http.ListenAndServe(":8080", nil)
}
func HelloServer(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hello, World!")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment