templater

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultMessageTemplate string = `https://reddit.com{{ .Post.Permalink }}{{ if not .Post.IsSelf }}
{{ .Post.URL }}{{ end }}`
View Source
const DefaultTitleTemplate string = "{{ .Post.Title }}"

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	Post *reddit.Post
}

type Templater

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

func New

func New(titleTemplate, messageTemplate *template.Template) *Templater

func (*Templater) GetMessage

func (t *Templater) GetMessage(p *reddit.Post) string

func (*Templater) GetTitle

func (t *Templater) GetTitle(p *reddit.Post) string

Jump to

Keyboard shortcuts

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