emerchantpay_rss_reader

package module
v0.0.0-...-ee7d580 Latest Latest
Warning

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

Go to latest
Published: May 18, 2019 License: MIT Imports: 8 Imported by: 1

README

This is a first part of the RSS reader task for the Emerchantpay

The goal is to:

Create an RSS Reader package, which can parse asynchronous multiple RSS
feeds.

Package interface

The package exports the following struct


type RssItem struct{
  Title string
  Source string
  SourceURL string
  Link string
  PubishDate time.Time
  Description string
}

And the function:


Parse(urls []string) []RssItem

The Parse function is asynchronous and is implemented with sync package and goroutines. It also requires github.com/sirupsen/logrus external package for logginng.

How to install run and test


# Install
git clone https://github.com/MichaelLeachim/emerchantpay_rss_reader;
cd emerchantpay_rss_reader; 

# Run tests
go test; 

# Run benchmark
go test -bench; 

Additional notes

  • Parser is implemented using DI principle in order to separate concerns and test the main method easily.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RssItem

type RssItem struct {
	Title       string
	Source      string
	SourceURL   string
	Link        string
	Description string
	PubishDate  time.Time
}

func Parse

func Parse(urls []string) []RssItem

Jump to

Keyboard shortcuts

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