package httperrors import ( "fmt" "net/http" ) type content struct { status int title string statusString string header string subHeader string } var ( content401 = content{ http.StatusUnauthorized, "Unauthorized (401)", "401", "You don't have permission to access the resource.", `
The resource that you are attempting to access is protected and you don't have the necessary permissions to view it.
`, } content404 = content{ http.StatusNotFound, "The page you're looking for could not be found (404)", "404", "The page you're looking for could not be found.", `The resource that you are attempting to access does not exist or you don't have the necessary permissions to view it.
Make sure the address is correct and that the page hasn't moved.
Please contact your GitLab administrator if you think this is a mistake.
`, } content500 = content{ http.StatusInternalServerError, "Something went wrong (500)", "500", "Whoops, something went wrong on our end.", `Try refreshing the page, or going back and attempting the action again.
Please contact your GitLab administrator if this problem persists.
`, } content502 = content{ http.StatusBadGateway, "Something went wrong (502)", "502", "Whoops, something went wrong on our end.", `Try refreshing the page, or going back and attempting the action again.
Please contact your GitLab administrator if this problem persists.
`, } content503 = content{ http.StatusServiceUnavailable, "Service Unavailable (503)", "503", "Whoops, something went wrong on our end.", `Try refreshing the page, or going back and attempting the action again.
Please contact your GitLab administrator if this problem persists.
`, } ) const predefinedErrorPage = `