utils

package
v0.0.0-...-9d4e64b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchAndParseHTML

func FetchAndParseHTML(url string) (*goquery.Document, error)

fetchAndParseHTML fetches and parses the HTML content of a given URL. It uses the provided URL to create a new HTTP request and retrieves the HTML content of the URL. It returns a goquery.Document and an error if any occurred.

func ShouldPrintPublished

func ShouldPrintPublished(published *models.Published, currentTime time.Time) bool

shouldPrintPublished checks if the published ad should be printed based on its time and the current time. It takes a Published struct and the current time as input and returns a boolean. It parses the time of the published ad and checks if it is after the current time. If the published ad is after the current time, it should be printed and the function returns true.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL