PcSpecs is a package to gather the system specs.
- Hostname
- Platform
- OsNumber
- CPU
- GPU
- RAM
- Disk
- MAINBOARD
PcSpecs requires Go v1.11+ to run.
Install the dependencies.
go get github.com/illud/pcspecs
Or
go install github.com/illud/pcspecs@latest
Import:
pcs "github.com/illud/pcspecs"
Example:
package main
import pcs "github.com/illud/pcspecs"
func main(){
fmt.Println(pcs.Spec())
/* Output
DESKTOP-5DH6S74
Microsoft Windows 10 Pro
10
Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz
NVIDIA GeForce RTX 2060 SUPER
24
134
TUF GAMING B460M-PLUS (WI-FI)*/
}
Or
package main
import pcs "github.com/illud/pcspecs"
func main(){
fmt.Println(pcs.Spec().GPU)
/* Output
NVIDIA GeForce RTX 2060 SUPER
*/
}
MIT
PcSpecs is MIT licensed.