@@ -66,12 +66,12 @@ func FormatHardwareProfile(s *HardwareProfile) string {
6666 if s .RAMBytes != nil {
6767 _ , _ = fmt .Fprintf (& b , " RAM: %.1f GB\n " , float64 (* s .RAMBytes )/ (1024 * 1024 * 1024 ))
6868 }
69- parseGPUs (s , b )
69+ parseGPUs (s , & b )
7070 _ , _ = fmt .Fprintf (& b , " Arch: %s\n " , s .Architecture )
7171 if s .OS != "" || s .OSVersion != "" {
7272 _ , _ = fmt .Fprintf (& b , " OS: %s %s\n " , s .OS , s .OSVersion )
7373 }
74- parseInterconnects (s , b )
74+ parseInterconnects (s , & b )
7575 for _ , st := range s .Storage {
7676 _ , _ = fmt .Fprintf (& b , " Storage: %.1f GB" , float64 (st .StorageBytes )/ (1024 * 1024 * 1024 ))
7777 if st .StorageType != "" {
@@ -85,37 +85,37 @@ func FormatHardwareProfile(s *HardwareProfile) string {
8585 return b .String ()
8686}
8787
88- func parseGPUs (s * HardwareProfile , b strings.Builder ) {
88+ func parseGPUs (s * HardwareProfile , b * strings.Builder ) {
8989 for _ , gpu := range s .GPUs {
9090 if gpu .MemoryBytes != nil {
9191 memGB := float64 (* gpu .MemoryBytes ) / (1024 * 1024 * 1024 )
92- _ , _ = fmt .Fprintf (& b , " GPUs: %d x %s (%.1f GB)" , gpu .Count , gpu .Model , memGB )
92+ _ , _ = fmt .Fprintf (b , " GPUs: %d x %s (%.1f GB)" , gpu .Count , gpu .Model , memGB )
9393 } else {
94- _ , _ = fmt .Fprintf (& b , " GPUs: %d x %s" , gpu .Count , gpu .Model )
94+ _ , _ = fmt .Fprintf (b , " GPUs: %d x %s" , gpu .Count , gpu .Model )
9595 }
9696 if gpu .Architecture != "" {
97- _ , _ = fmt .Fprintf (& b , " [%s]" , gpu .Architecture )
97+ _ , _ = fmt .Fprintf (b , " [%s]" , gpu .Architecture )
9898 }
9999 b .WriteString ("\n " )
100100 }
101101}
102102
103- func parseInterconnects (s * HardwareProfile , b strings.Builder ) {
103+ func parseInterconnects (s * HardwareProfile , b * strings.Builder ) {
104104 for _ , ic := range s .Interconnects {
105- _ , _ = fmt .Fprintf (& b , " Link: %s" , ic .Type )
105+ _ , _ = fmt .Fprintf (b , " Link: %s" , ic .Type )
106106 if ic .Generation > 0 || ic .Width > 0 {
107107 if ic .Generation > 0 {
108- _ , _ = fmt .Fprintf (& b , " Gen%d" , ic .Generation )
108+ _ , _ = fmt .Fprintf (b , " Gen%d" , ic .Generation )
109109 }
110110 if ic .Width > 0 {
111- _ , _ = fmt .Fprintf (& b , " x%d" , ic .Width )
111+ _ , _ = fmt .Fprintf (b , " x%d" , ic .Width )
112112 }
113113 }
114114 if ic .Device != "" {
115- _ , _ = fmt .Fprintf (& b , " (%s)" , ic .Device )
115+ _ , _ = fmt .Fprintf (b , " (%s)" , ic .Device )
116116 }
117117 if ic .ActiveLinks > 0 {
118- _ , _ = fmt .Fprintf (& b , " x%d" , ic .ActiveLinks )
118+ _ , _ = fmt .Fprintf (b , " x%d" , ic .ActiveLinks )
119119 }
120120 b .WriteString ("\n " )
121121 }
0 commit comments