textproc

package
v0.0.0-...-b7062c8 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2017 License: LGPL-3.0-or-later Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFuncs

func AddFuncs(funcs *map[string]TextFunc)

AddFuncs appends TextFunc functions to the text processing engine

func AddMaps

func AddMaps(funcs *map[string]MapFunc)

AddMaps appends MapFunc functions to the text processing engine

func Break

func Break(vars *map[string]string, pars ...string) string

Break returns BR tag

func Link(vars *map[string]string, pars ...string) string

Link returns HREF tag where pars[0] - url, pars[1] - text, pars[2] - title

func Macro

func Macro(input string, vars *map[string]string) string

Macro replaces macro variables in the input string and returns the result

func Process

func Process(input string, vars *map[string]string) (out string)

Process replaces variables and func calling in the input string and returns the result.

func Split

func Split(input string) *[][]string

Split parses the input string as [[,,],[,,],[,,]]

func Tag

func Tag(vars *map[string]string, pars ...string) string

Tag returns HTML tag where pars[0] - tag's name, pars[1] - body of the tag

Types

type MapFunc

type MapFunc func(*map[string]string, *map[string]string) string

MapFunc is a function type with 1 - variables, 2 - map of parameters

type TextFunc

type TextFunc func(*map[string]string, ...string) string

TextFunc is a function type with 1 - variables, 2... - parameters

type TextProc

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

TextProc is a strcuture for the text processing

Jump to

Keyboard shortcuts

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