tokenize

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Tokenize

func Tokenize(corpus string, tokens Tokens) string

Tokenize replaces a given set of tokens in a corpus. Tokens should appear in the corpus in the form ${[KEY]} where [KEY] is the key in the map. Examples: corpus: "foo/${bar}/baz", { "bar": "bailey" } => "foo/bailey/baz" UTF-8 is handled via. runes.

Types

type Tokens

type Tokens = map[string]string

Tokens is a soft alias to map[string]string

Jump to

Keyboard shortcuts

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