common

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateMessagesFromFile

func CreateMessagesFromFile(filePath string, recipients []string) (map[string]string, error)

CreateMessagesFromFile creates a map of messages for multiple recipients from a file

func CreateMessagesFromString

func CreateMessagesFromString(message string, recipients []string) map[string]string

CreateMessagesFromString creates a map of messages for multiple recipients from a single message string

func GetDecodeFunc

func GetDecodeFunc(extension string) (file_readers.DecodeFunc, error)

GetDecodeFunc returns the decoder function for a given file extension

func GetFileExtension

func GetFileExtension(filename string) string

GetFileExtension returns the extension of a file without the leading dot

func GetMessageContent

func GetMessageContent(messageStr, messageFilePath string) (string, error)

GetMessageContent reads message content from either a string or file and processes it with RawToHTML Returns the processed message content or an error if file reading fails

func ParseTemplateAndData

func ParseTemplateAndData(templatePath, dataPath string) (map[string]string, error)

ParseTemplateAndData parses a template file and data file to generate messages

Types

This section is empty.

Jump to

Keyboard shortcuts

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