If you do not want to use any of the many available routing packages, you need to analyze the path yourself:
Pave the / provision path to your handler
http.HandleFunc("/provisions/", Provisions)
Then split the path as needed in the handler
id := strings.TrimPrefix(req.URL.Path, "/provisions/")
// or use strings.Split, or use regexp, etc.
source
share