MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / ReplaceRestfulPath

Function ReplaceRestfulPath

common/regexp.go:128–130  ·  view source on GitHub ↗

ReplaceRestfulPath 将restful路径转换成apinto的正则匹配路径

(path, replaceStr string)

Source from the content-addressed store, hash-verified

126
127// ReplaceRestfulPath 将restful路径转换成apinto的正则匹配路径
128func ReplaceRestfulPath(path, replaceStr string) string {
129 return restfulPathMatchRegexp.ReplaceAllString(path, replaceStr)
130}
131
132// CheckPathContainsIPPort 检查路径中是否包含xxx://ip:port
133func CheckPathContainsIPPort(path string) bool {

Callers 1

ToRouterFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected