Documentation
¶
Overview ¶
Package source defines the common interface and shared logic for wallpaper providers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Download ¶
func Download(ctx context.Context, client *resty.Client, path, prefix string, images []Image, set bool) error
Download fetches images concurrently and saves them to disk. It uses errgroup for goroutine management and error propagation. When set is true, one of the downloaded images (chosen at random) is applied as the desktop wallpaper once all downloads have finished.
Types ¶
type DownloadFailedError ¶
DownloadFailedError indicates that downloading an image failed with a non-2xx status.
func (*DownloadFailedError) Error ¶
func (e *DownloadFailedError) Error() string
Click to show internal directories.
Click to hide internal directories.