You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
345 B

  1. package Webserver
  2. import (
  3. "log"
  4. "net/http"
  5. "PersonalWebsite/Database"
  6. )
  7. func ViewIndex(w http.ResponseWriter, r *http.Request) {
  8. var (
  9. v = make(map[string]interface{})
  10. e error
  11. )
  12. v["SidebarLinks"], e = Database.GetAllSidebarLinks()
  13. if e != nil {
  14. // TODO: Handle
  15. log.Fatal(e)
  16. }
  17. ServeTemplate(w, r, "html/index.gohtml", v)
  18. }