code: func (h *HTTPBin) Links(w http.ResponseWriter, r *http.Request) {
  	parts := strings.Split(r.URL.Path, "/")
  	if len(parts) != 3 && len(parts) != 4 {
  		http.Error(w, "Not found", http.StatusNotFound)
  		return
  	}
  
  	n, err := strconv.Atoi(parts[2])
  	if err != nil || n < 0 || n > 256 {
  		http.Error(w, "Invalid link count", http.StatusBadRequest)
  		return
  	}
  
  	// Are we handling /links/<n>/<offset>? If so, render an HTML page
  	if len(parts) == 4 {
  		offset, err := strconv.Atoi(parts[3])
  		if err != nil {
  			http.Error(w, "Invalid offset", http.StatusBadRequest)
  		}
  		doLinksPage(w, r, n, offset)
  		return
  	}
  
  	// Otherwise, redirect from /links/<n> to /links/<n>/0
  	r.URL.Path = r.URL.Path + "/0"
  	w.Header().Set("Location", r.URL.String())
  	w.WriteHeader(http.StatusFound)
  }
docs: // Links redirects to the first page in a series of N links