util

package
v0.0.0-...-2abc9a5 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger *zap.Logger

Functions

func GetKramerism

func GetKramerism() string

Function to randomly select a kramerism

func SendPostRequest

func SendPostRequest(url string, jsonBody []byte)

Send a post request to the webhook

func SetupConfig

func SetupConfig(conf_path string) (*viper.Viper, error)

Setup viper config

func SetupLogger

func SetupLogger(logLevel zapcore.Level, fileMode bool) *zap.Logger

function to setup the logger

func ShortenString

func ShortenString(str string, length int) string

Function to shorten a string to specified length

Types

type RssParser

type RssParser struct {
	Url    string
	Logger *zap.Logger
}

func (*RssParser) ParseFeed

func (rss *RssParser) ParseFeed() (*gofeed.Feed, error)

Parse the RSS Url and return feed item

func (*RssParser) SetUrl

func (rss *RssParser) SetUrl(url string)

Change Url

Jump to

Keyboard shortcuts

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