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