package main import ( "fmt" "net/http" ) func main() { http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { fmt.Printf("Request received from: %s\n", r.RemoteAddr) w.Write([]byte("Hello, world!")) }) http.ListenAndServe(":8080", nil) }In this example, we create an HTTP server that listens for requests on port 8080. When a request is received, the server logs the client's IP address using RemoteAddr and sends a "Hello, world!" response back. Overall, this example demonstrates how the Go net/http package can be used to quickly and easily create a lightweight HTTP server with powerful features like RemoteAddr.