code: func autoDiscover(body []byte) (feedURL string, err error) {
  	r := bytes.NewReader(body)
  	z := html.NewTokenizer(r)
  	for {
  		if z.Next() == html.ErrorToken {
  			break
  		}
  		t := z.Token()
  		switch t.DataAtom {
  		case atom.Link:
  			if t.Type == html.StartTagToken || t.Type == html.SelfClosingTagToken {
  				attrs := make(map[string]string)
  				for _, a := range t.Attr {
  					attrs[a.Key] = a.Val
  				}
  				if attrs["rel"] == "alternate" && attrs["href"] != "" &&
  					(attrs["type"] == "application/rss+xml" || attrs["type"] == "application/atom+xml") {
  					return attrs["href"], nil
  				}
  			}
  		}
  	}
  	return "", fmt.Errorf("No feed link found")
  }
docs: // autodiscover takes an HTML document and returns the autodiscovered feed
  // URL. Returns an error if there is no such URL.