Search search signature
(code string)
| 176 | |
| 177 | // Search search signature |
| 178 | func (s *Scanner) Search(code string) ([]*Result, error) { |
| 179 | s.Code = code |
| 180 | if IsDir(s.Path) { |
| 181 | if files, err := Files(s.Path); err != nil { |
| 182 | return nil, err |
| 183 | } else { |
| 184 | return s.Matcher.Search(files, s.Code) |
| 185 | } |
| 186 | } |
| 187 | return nil, ErrNotIsDir |
| 188 | } |
| 189 | |
| 190 | // List returns all files under the specified path to calculate the signature |
| 191 | func (s *Scanner) List() ([]*Result, error) { |