templates

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2025 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	MsgStart = `` /* 416-byte string literal not displayed */

	MsgDownloadStarted = "🔄 Started downloading podcast..."

	MsgBuildSuccess = "✅ RSS feed built successfully!"

	MsgSomethingWentWrong = "⚠️ Something went wrong."
	MsgUnknownError       = "⚠️ An unknown error occurred."

	MsgBuildFeedFailed     = "⚠️ Failed to build the RSS feed."
	MsgBuildLandingFailed  = "⚠️ Failed to build the landing page."
	MsgDownloadFailed      = "⚠️ Download failed. The media might be unavailable or protected."
	MsgDownloadInProgress  = "⚠️ This episode is already being processed. Please wait."
	MsgDownloadExists      = "⚠️ This episode has already been downloaded."
	MsgDownloadInterrupted = "⚠️ Download was interrupted. Please try again."
	MsgNoMatchingPlatform  = "⚠️ This URL is not supported. Please provide a valid video URL."
	MsgDownloadBusy        = "⏳ Another download is in progress. Please try again later..."
	MsgInvalidRequest      = "⚠️ This request is invalid."
)

Variables

View Source
var FeedInfoTemplate *template.Template

FeedInfoTemplate is the parsed template for /info command response

View Source
var LandingTemplate *template.Template

LandingTemplate - template for the podcast landing page.

Functions

func Init

func Init(_ context.Context) error

func MsgDownloadSuccess

func MsgDownloadSuccess(episodeTitle string) string

MsgDownloadSuccess formats the download success message with the episode title.

func MsgError

func MsgError(err error) string

MsgError maps an error to a user-friendly message.

Types

type LandingData

type LandingData struct {
	Feed     domain.FeedInfo
	Episodes []*domain.Episode
}

LandingData is the input context for LandingTemplate

Jump to

Keyboard shortcuts

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