go_rss_reader

package module
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: MIT Imports: 11 Imported by: 0

README

go-rss-reader

How to Use Package

  1. Install the package using "go get github.com/muzamilQP/go-rss-reader@v1.2.0" in the terminal.
  2. Import package to your file.
  3. Use 'packageName'.RssItem() to create variable of type RssItem.
  4. Pass the list of urls to x.Parse(y), where 'x' is the variable of type 'packageName'.RssItem() and 'y' is the list of urls.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitZapLogger added in v1.2.0

func InitZapLogger() (*zap.Logger, error)

InitZapLogger - init zap logger from JSON file and set as global zap

func SyslogTimeEncoder added in v1.2.0

func SyslogTimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder)

SyslogTimeEncoder - time stamp format for zap logger

Types

type RssItem

type RssItem struct {
	Title       string    `json:"title"`
	Source      string    `json:"source"`
	SourceURL   string    `json:"source_url"`
	Link        string    `json:"link"`
	PublishDate time.Time `json:"publish_date"`
	Description string    `json:"description"`
}

func (*RssItem) Parse

func (r *RssItem) Parse(rssUrls []string) ([]RssItem, error)

Jump to

Keyboard shortcuts

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