xtransform

package
v0.1.29 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Translate

func Translate(tpl string, data map[string]interface{}) string

Translate 模板转换字符串 eg1: str="aaa:bbb:@ccc" data={ccc:100} ==> "aaa:bbb:100" eg2: str="aaa:bbb:@{ccc}" data={ccc:200} ==> "aaa:bbb:200" eg3: str="aaa:@bbb:@{ccc}" data={bbb:"abcd",ccc:200} ==> "aaa:abcd:200" eg4: str="@aaa:@bbb:@{ccc}" data={bbb:"abcd",ccc:200} ==> ":abcd:200"

func TranslateMap

func TranslateMap(tpl string, data map[string]string) string

func TranslateObject

func TranslateObject(tpl string, data interface{}) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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