8bfeb7d90d
- update fatih/color (fix windows issue) - update mongo-driver (fix build issue) - go.mod: merge two "require" blocks - update semver dependency (same version as indirect dep), fix test checks in cscli setup - remove gotest.tools dependency (use testify, cstest) - update x/ exp, mod, sys dependencies
21 lines
439 B
Go
21 lines
439 B
Go
package csplugin
|
|
|
|
import (
|
|
"os"
|
|
"path/filepath"
|
|
)
|
|
|
|
// helper which gives paths to all files in the given directory non-recursively
|
|
func listFilesAtPath(path string) ([]string, error) {
|
|
filePaths := make([]string, 0)
|
|
files, err := os.ReadDir(path)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
for _, file := range files {
|
|
if !file.IsDir() {
|
|
filePaths = append(filePaths, filepath.Join(path, file.Name()))
|
|
}
|
|
}
|
|
return filePaths, nil
|
|
}
|