This commit is contained in:
parent
af1e69e594
commit
c6f9620945
@ -140,8 +140,6 @@ func CPUMemoryStats(applist *[]apps.App, sample int) (*[]apps.App, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func getTechAndVersion(symlink string) (*TechInfo, error) {
|
func getTechAndVersion(symlink string) (*TechInfo, error) {
|
||||||
symlink = strings.TrimSuffix(symlink, "/bin")
|
|
||||||
|
|
||||||
link, err := os.Readlink(symlink)
|
link, err := os.Readlink(symlink)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error reading symlink: %w", err)
|
return nil, fmt.Errorf("error reading symlink: %w", err)
|
||||||
@ -151,6 +149,7 @@ func getTechAndVersion(symlink string) (*TechInfo, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error getting absolute path: %w", err)
|
return nil, fmt.Errorf("error getting absolute path: %w", err)
|
||||||
}
|
}
|
||||||
|
absLink = strings.TrimSuffix(absLink, "/bin")
|
||||||
|
|
||||||
dirName := filepath.Base(absLink)
|
dirName := filepath.Base(absLink)
|
||||||
parts := strings.Split(dirName, "-")
|
parts := strings.Split(dirName, "-")
|
||||||
|
Loading…
Reference in New Issue
Block a user