I'm currently trying to read the name of a process in Go how it is represented in the windows task manager.
However, when I read it in Go it is displayed always as the executable. I'm trying to get it how it is named in the task manager.
Code:
package main
import (
"fmt"
"github.com/shirou/gopsutil/process"
)
func main() {
p, _ := process.Processes()
for _, pr := range p {
fmt.Println(pr.Name())
}
}
This outputs all process names but none match how it is shown here:
I am trying to read the Spotify process name that is displayed with the song title.