http.Handle("/", http.FileServer(http.Dir("."))) http.ListenAndServe(":8080", nil)
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, "index.html") }) http.ListenAndServe(":8080", nil)In the first example, the `http.Dir()` function is used to get a handle to the current directory. Then, the `http.FileServer()` function is used to create an `http.Handler` that serves files from this directory. Finally, the server is started using `http.ListenAndServe()`. In the second example, the `http.HandleFunc()` function is used to register a handler function for the root URL path. This function uses the `http.ServeFile()` function to serve a specific file ("index.html") from the current directory. Again, the server is started using `http.ListenAndServe()`.