Documentation
¶
Index ¶
- func ApplyDefaults[T any](defaults *T, supplied *T) *T
- func FetchHash(ctx context.Context, url string) (string, error)
- func FetchHtmlAndFind(ctx context.Context, url string, selector string) ([]string, error)
- func FetchJson(ctx context.Context, url string, i interface{}) error
- func FetchYaml(ctx context.Context, url string, i interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyDefaults ¶
func ApplyDefaults[T any](defaults *T, supplied *T) *T
func FetchHash ¶
FetchHash downloads the given URL and parses the first hash out of it, assuming it's formatted in line with the output of sha256sum. Hashes are assumed to be hexadecimal and an error will be returned if this is not the case.
func FetchHtmlAndFind ¶
FetchHtmlAndFind downloads the HTML page at the given URL and runs the specified CSS selector over it to find nodes. The textual content of those nodes is returned.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.