ALL SORTS OF THINGS

This commit is contained in:
2025-04-21 23:04:24 -04:00
parent b79b34e8cc
commit 92d4be2f23
3 changed files with 9 additions and 8 deletions

View File

@@ -54,9 +54,9 @@ type redditResponse struct {
} `json:"data"`
}
func GetLatestImage() (string, error) {
func GetLatestImage(httpGet func(url string) (*http.Response, error)) (string, error) {
response, err := http.Get("https://www.reddit.com/r/wallpaper/.json")
response, err := httpGet("https://www.reddit.com/r/wallpaper/.json")
if err != nil {
return "", err
}