product

package
v0.0.0-...-694ccaf Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParsePrice

func ParsePrice(doc *goquery.Document, link string) (float64, error)

func SortByPrice

func SortByPrice(prods []Product)

Types

type Product

type Product struct {
	URL   string
	Name  string
	Price float64 // Yeah representing money as float is not an good idea in general
}

func Filter

func Filter(name string, prods []Product) []Product

func Get

func Get(link string) (Product, error)

func GetProducts

func GetProducts(urls []string) ([]Product, error)

GetProducts gets all products details from the given URLs. It is possible to have results and an error, which indicates a partial result.

Jump to

Keyboard shortcuts

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