Routes
This codebase defines a single route:
/
- This route handles HTTP GET requests and calls theHelloWorld
function.
r.HandleFunc("/", HelloWorld).Methods("GET")
This code snippet, located on line 17 of the codebase, defines the route and its associated HTTP method. It uses the HandleFunc
method of the mux
package to register a handler function for the specified path /
. The Methods
method is then used to specify that this handler will only respond to GET requests.