// parseLinkHeader tries to parse a list of RFC8288 compliant headers
parseLinkHeader tries to parse a list of RFC8288 compliant headers
// parseLinkHeader tries to parse a list of RFC8288 compliant headers
func parseLinkHeaders(headers string) ([]linkHeader, error) {
	var linkHeaders []linkHeader
	links := strings.Split(headers, ",")
	for _, l := range links {
		link, err := parseLinkHeader(strings.Trim(l, " "))
		if err != nil {
			return nil, err
		}
		linkHeaders = append(linkHeaders, link)
	}
	return linkHeaders, nil
}
func parseLinkHeaders ( headers string ) ( [ ] linkHeader , error ) { var linkHeaders [ ] linkHeader links := strings . Split ( headers , " " ) for _ , l := range links { link , err := parseLinkHeader ( strings . Trim ( l , " " ) ) if err != nil { return nil , err } linkHeaders = append ( linkHeaders , link ) } return linkHeaders , nil }
parseLinkHeader tries to parse a list of RFC8288 compliant headers
parseLinkHeader tries to parse a list of RFC8288 compliant headers