Help us shape the future of Go! Take the 2026 Go Developer Survey

util

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2026 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CSSSelector

func CSSSelector(n *html.Node) string

Get a CSS selector that will uniquely select a provided HTML element If the element has an ID, returns #id; otherwise returns the parent (if any) CSS selector, followed by '>' followed by a unique selector for the element (tag.class.class:nth-child(n)). Logic copied from JSoup: https://github.com/jhy/jsoup/blob/0b10d516ed8f907f8fb4acb9a0806137a8988d45/src/main/java/org/jsoup/nodes/Element.java#L829

Types

type JSONMappable

type JSONMappable interface {
	// JSONMap returns a JSON object representation of the receiver.
	JSONMap() (map[string]any, error)
}

Jump to

Keyboard shortcuts

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