Lines Matching refs:err
65 buf, err := json.Marshal(multipleMatches)
66 if err != nil {
67 panic(fmt.Errorf("failed to marshal glob results to json: %w", err))
103 matches, deps, err := glob(fs, pattern, false, follow)
105 if err != nil {
106 return GlobResult{}, err
109 matches, err = filterExcludes(matches, excludes)
110 if err != nil {
111 return GlobResult{}, err
130 info, err = fs.Lstat(match)
132 info, err = fs.Stat(match)
134 if err != nil {
135 return GlobResult{}, err
154 follow ShouldFollowSymlinks) (matches, dirs []string, err error) {
160 matches, err = fs.glob(pattern)
161 if err != nil {
162 return matches, dirs, err
171 matchDirs, err = fs.glob(pattern)
172 if err != nil {
173 return matches, dirs, err
178 return matches, dirs, err
192 dirMatches, dirs, err := glob(fs, dir, hasRecursive, follow)
193 if err != nil {
194 return nil, nil, err
198 isDir, err := fs.IsDir(m)
199 if os.IsNotExist(err) {
204 if err != nil {
205 return nil, nil, fmt.Errorf("unexpected error after glob: %s", err)
210 recurseDirs, err := fs.ListDirsRecursive(m, follow)
211 if err != nil {
212 return nil, nil, err
217 newMatches, err := fs.glob(filepath.Join(MatchEscape(m), file))
218 if err != nil {
219 return nil, nil, err
266 exclude, err := Match(e, m)
267 if err != nil {
268 return nil, err
327 if match, err := filepath.Match(pattern, name); err != nil {
328 return false, err
348 match, err := filepath.Match(patternFile, nameFile)
349 if err != nil || !match {
350 return match, err
379 err := os.MkdirAll(dir, 0777)
380 if err != nil {
381 return err
384 info, err := os.Stat(filename)
385 if err != nil {
386 if os.IsNotExist(err) {
390 return err
396 oldData, err := ioutil.ReadFile(filename)
397 if err != nil {
398 return err
415 err = ioutil.WriteFile(filename, data, perm)
416 if err != nil {
417 return err