(paths []string)
| 81 | } |
| 82 | |
| 83 | func EnsureAbsolutePaths(paths []string) ([]string, error) { |
| 84 | wd, err := os.Getwd() |
| 85 | if err != nil { |
| 86 | return nil, errors.WithStack(err) |
| 87 | } |
| 88 | absPaths := make([]string, len(paths)) |
| 89 | for i, path := range paths { |
| 90 | if filepath.IsAbs(path) { |
| 91 | absPaths[i] = path |
| 92 | } else { |
| 93 | absPaths[i] = filepath.Join(wd, path) |
| 94 | } |
| 95 | } |
| 96 | return absPaths, nil |
| 97 | } |
no outgoing calls
no test coverage detected