weblinks

package module
v0.0.0-...-496fa4b Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2021 License: MIT Imports: 7 Imported by: 1

README


A parser for Link headers, as defined by rfc5988. There are many like it, but this one is mine.

Features

Supports ext rels, target attributes, and a few RFC minutia. Doesn't use regular expressions.

Other Implementations

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Link struct {
	URI        *url.URL
	Attributes map[string]string
	// contains filtered or unexported fields
}

Link is the link URI and associated attributes

type Links map[string]*Link

Links is a mapping of rel strings to Link objects

func Parse

func Parse(s string) (Links, error)

Parse parses a set of web links, usually delivered by Link header, according to [RFC5988](https://datatracker.ietf.org/doc/html/rfc5988)

Jump to

Keyboard shortcuts

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