rssfinder

package module
v0.1.2 Latest Latest
Warning

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

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

README

rssfinder

Build Status Go Reference

rssfinder is a library that finds RSS feeds from an URL.

Example:

package main

import (
	"fmt"

	"github.com/y-yagi/rssfinder"
)

func main() {
	feeds, err := rssfinder.Find("https://github.com/y-yagi/rssfinder/releases")
	if err != nil {
		fmt.Printf("Find error: %v\n", err)
		return
	}

	for _, feed := range feeds {
		fmt.Printf("Type: '%v', Title: '%v', Href: '%v'\n", feed.Type, feed.Title, feed.Href)
		// Type: 'application/atom+xml', Title: 'rssfinder Release Notes', Href: 'https://github.com/y-yagi/rssfinder/releases.atom'
		// Type: 'application/atom+xml', Title: 'rssfinder Tags', Href: 'https://github.com/y-yagi/rssfinder/tags.atom'
	}
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Feed

type Feed struct {
	Type  string
	Href  string
	Title string
}

Feed is a type of RSS feed.

func Find

func Find(url string) ([]*Feed, error)

Find finds feeds from URL.

Jump to

Keyboard shortcuts

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