mirror of
https://github.com/silenceper/wechat.git
synced 2026-02-08 14:42:26 +08:00
improve comment ,参考:https://github.com/huacnlee/autocorrect
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Template 对字符串中的和map的key相同的字符串进行模板替换 仅支持 形如: {name}
|
||||
// Template 对字符串中的和 map 的 key 相同的字符串进行模板替换 仅支持 形如:{name}
|
||||
func Template(source string, data map[string]interface{}) string {
|
||||
sourceCopy := &source
|
||||
for k, val := range data {
|
||||
|
||||
Reference in New Issue
Block a user