mirror of
https://github.com/qdm12/gluetun.git
synced 2026-07-30 17:03:22 +02:00
13 lines
218 B
Go
13 lines
218 B
Go
package html
|
|
|
|
import "golang.org/x/net/html"
|
|
|
|
func Attribute(node *html.Node, key string) (value string) {
|
|
for _, attribute := range node.Attr {
|
|
if attribute.Key == key {
|
|
return attribute.Val
|
|
}
|
|
}
|
|
return ""
|
|
}
|