MCPcopy
hub / github.com/zeromicro/go-zero / Match

Method Match

tools/goctl/model/sql/command/command.go:160–172  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

158type pattern map[string]struct{}
159
160func (p pattern) Match(s string) bool {
161 for v := range p {
162 match, err := filepath.Match(v, s)
163 if err != nil {
164 console.Error("%+v", err)
165 continue
166 }
167 if match {
168 return true
169 }
170 }
171 return false
172}
173
174func (p pattern) list() []string {
175 ret := make([]string, 0, len(p))

Callers 15

Test_parseTableListFunction · 0.80
fromMysqlDataSourceFunction · 0.80
fromPostgreSqlDataSourceFunction · 0.80
MatchFilesFunction · 0.80
TypeStructMethod · 0.80
TypeAliasMethod · 0.80
TypeBlockStructMethod · 0.80
DataTypeMethod · 0.80
PointerTypeMethod · 0.80
MapTypeMethod · 0.80
ArrayTypeMethod · 0.80
InfoSpecMethod · 0.80

Calls 1

ErrorFunction · 0.92

Tested by 1

Test_parseTableListFunction · 0.64