mirror of
https://github.com/aquasecurity/trivy.git
synced 2026-02-02 23:03:26 +08:00
Signed-off-by: knqyf263 <knqyf263@gmail.com> Co-authored-by: DmitriyLewen <91113035+DmitriyLewen@users.noreply.github.com>
22 lines
356 B
Go
22 lines
356 B
Go
package pom
|
|
|
|
import (
|
|
"os"
|
|
"strings"
|
|
)
|
|
|
|
func isDirectory(path string) (bool, error) {
|
|
fileInfo, err := os.Stat(path)
|
|
if err != nil {
|
|
return false, err
|
|
}
|
|
return fileInfo.IsDir(), err
|
|
}
|
|
|
|
func isProperty(version string) bool {
|
|
if version != "" && strings.HasPrefix(version, "${") && strings.HasSuffix(version, "}") {
|
|
return true
|
|
}
|
|
return false
|
|
}
|