test

package
v0.0.0-...-d1b8e3a Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TestFeed = feeds.Feed{
	FeedMeta: feeds.FeedMeta{
		UniqueID: "unique-feed-id",
		Language: "en-us",
		Title:    "syn test feed",
		Subtitle: `This is a test feed created for syn, a syndication library for
	Golang. It can read, write, and extend multiple syndication formats like
	RSS and Atom.`,
		IconLink: feeds.Link{Href: site + "/syn/icon.jpg"},
		LogoLink: feeds.Link{Href: site + "/syn/logo.jpg"},
		Categories: []feeds.Category{
			{Id: "0", Name: "test-data"},
		},
		Updated: time.Unix(1704067200, 0),
		Id:      site + "/syn-test-feed",
		Links: []feeds.Link{
			{Href: site + "/syn-test-feed", RelType: feeds.LinkRelSelf},
		},
		Rights: "copyright 2024 jnichols",
	},
	Extensions: feeds.Extensions{
		feeds.NewExtension(site+"/feeds.xml", "metadata", testExt{
			Message: "hello world",
			Data:    []string{"this", "is", "some", "data"},
		}),
	},
	Entries: []feeds.Entry{
		{
			UniqueID: "unique-entry-id",
			Language: "en-us",
			Title:    "syn test entry",
			Subtitle: "This is a test entry for the test feed of feeds.",
			Categories: []feeds.Category{
				{Id: "0", Name: "test-data"},
				{Id: "test-entry"},
			},
			Updated:   time.Unix(1704067200, 0),
			Published: time.Unix(1704067200, 0),
			Id:        site + "/syn-test-feed/test-entry",
			Links: []feeds.Link{
				{Href: site + "/syn-test-feed/test-entry", RelType: feeds.LinkRelSelf},
			},
			Authors: []feeds.Person{
				{Name: "jnichols"},
			},
			Extensions: feeds.Extensions{
				feeds.NewExtension(site+"/feeds.xml", "metadata", "you can also extend entries"),
			},
			Content: "<p>lorem ipsum, etc.</p>",
		},
	},
}

TestFeed is a universal testing feed to check translations to/from protocols.

Functions

func Diff

func Diff(want, have string) (err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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