Various tweaks making use of new formatting

This commit is contained in:
2022-11-29 03:33:53 -05:00
parent 4395e5d563
commit 0e5d54cf18
3 changed files with 14 additions and 15 deletions

View File

@@ -65,7 +65,7 @@ func fetchBack (location *url.URL, viewSource bool, addToHistory bool) {
fetchString(bookmarks.Gemtext(), page.currentUrl)
default:
fetchString (
"# Error\n" +
"# Error\n\n" +
"That page does not exist.",
page.currentUrl)
}
@@ -89,7 +89,7 @@ func fetchBack (location *url.URL, viewSource bool, addToHistory bool) {
if err != nil {
fetchString (
"# Error\n" +
"# Error\n\n" +
"There was an error connecting to " +
location.String() + "\n\n" +
"> " + err.Error() + "\n",
@@ -134,7 +134,7 @@ func fetchBack (location *url.URL, viewSource bool, addToHistory bool) {
case gemini.StatusRedirect:
if page.redirectCounter > 8 {
fetchString (fmt.Sprintf (
"# Too many redirects\n" +
"# Too many redirects\n\n" +
"Enough! The site has redirected us too many " +
"times."),
page.currentUrl)
@@ -144,7 +144,7 @@ func fetchBack (location *url.URL, viewSource bool, addToHistory bool) {
location, err := url.Parse(response.Meta)
if err != nil {
fetchString (fmt.Sprintf (
"# Error\n" +
"# Error\n\n" +
"The site responded with an invalid redirect:\n\n" +
"%s",
err.Error()), page.currentUrl)
@@ -157,14 +157,14 @@ func fetchBack (location *url.URL, viewSource bool, addToHistory bool) {
case gemini.StatusTemporaryFailure, gemini.StatusPermanentFailure:
fetchString (fmt.Sprintf (
"# Error %d\n" +
"# Error %d\n\n" +
"The site responded with an error:\n\n" +
"> %s",
response.Status, response.Meta), page.currentUrl)
default:
fetchString (fmt.Sprintf (
"# Unhandled response status %d\n" +
"# Unhandled response status %d\n\n" +
"Skipper doesn't know how to handle this type of " +
"response yet.",
response.Status), page.currentUrl)