template

package
v0.0.0-...-0a60d77 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnonymousTemplate

type AnonymousTemplate struct{}

AnonymousTemplate represents the templater interface implementation using anonymous functions

func (*AnonymousTemplate) ExecuteAlgorithm

func (a *AnonymousTemplate) ExecuteAlgorithm(f func() string) string

ExecuteAlgorithm accepts MessageRetriever as argument and returns the full algorithm: a single string done by joining the strings returned by the first(), Message() string and third() methods

type MessageRetriever

type MessageRetriever interface {
	Message() string
}

MessageRetriever represents a message which will be returned to the user

func MessageRetrieverAdapter

func MessageRetrieverAdapter(f func() string) MessageRetriever

MessageRetrieverAdapter returns a MessageRetriever type

type Template

type Template struct{}

Template represents the templater interface implementation

func (*Template) ExecuteAlgorithm

func (t *Template) ExecuteAlgorithm(m MessageRetriever) string

ExecuteAlgorithm accepts MessageRetriever as argument and returns the full algorithm: a single string done by joining the strings returned by the first(), Message() string and third() methods

type Templater

type Templater interface {
	ExecuteAlgorithm(MessageRetriever) string
	// contains filtered or unexported methods
}

Templater describes the behavior of algorithm to be executed

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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