utils

package
v0.0.0-...-1ce83d5 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AreEqualStrings

func AreEqualStrings(items1, items2 []string) bool

func CollapseWhiteSpaces

func CollapseWhiteSpaces(value string) string

func ContainsStringIgnoreCase

func ContainsStringIgnoreCase(items []string, item string) bool

func GetCurrentTimestamp

func GetCurrentTimestamp() string

func GetMarkdownLinkPath

func GetMarkdownLinkPath(linkPath, baseDir string) string

func GetTimestamp

func GetTimestamp(moment time.Time) string

func GetValidFileName

func GetValidFileName(name string) string
func JoinMarkdownLinks(links ...string) string
func MakeMarkdownImageLink(linkTitle, imagePath, baseDir string) string
func MakeMarkdownLink(linkTitle, linkPath, baseDir string) string

func PadIntLeft

func PadIntLeft(value, width int) string

func PadStringLeft

func PadStringLeft(value string, width int) string

func PadStringRight

func PadStringRight(value string, width int) string

func ParseTimestamp

func ParseTimestamp(timestamp string) (time.Time, error)

func RemoveItemIgnoreCase

func RemoveItemIgnoreCase(items []string, item string) []string

func RenameItemIgnoreCase

func RenameItemIgnoreCase(items []string, oldItem, newItem string) []string

func SplitByRegexp

func SplitByRegexp(value string, re *regexp.Regexp) []string

func TitleFirstLetter

func TitleFirstLetter(s string) string

func WeekDelta

func WeekDelta(baseValue, value time.Time) int

func WeekEnd

func WeekEnd(value time.Time) time.Time

func WeekStart

func WeekStart(value time.Time) time.Time

Types

type MailSender

type MailSender struct {
	// contains filtered or unexported fields
}

func NewMailSender

func NewMailSender(smtpServer, smtpUser, smtpPassword, from string) *MailSender

func (*MailSender) SendEmail

func (m *MailSender) SendEmail(recipients []string, subject, message string) error

Jump to

Keyboard shortcuts

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