# README
userBenchmarkScraper 
A Golang library that scrapes devices and all available info for those devices that has been recorded on UserBenchmark.
Usage
/*
type PartInfo struct {
Type string `csv:"Type"` // Can be CPU, GPU, SSD, HDD, USB, or RAM
PartNum string `csv:"Part Number"` // Part Number or Exact Model
Brand string `csv:"Brand"` // The brand of the product (Ex. EVGA)
Model string `csv:"Model"` // Title of item
Rank int `csv:"Rank"` // Ranking in benchmarks
Benchmark float64 `csv:"Benchmark"` // Average benchmark score for the item
Samples int `csv:"Samples"` // How many benchmarks were taken for the item
URL string `csv:"URL"` // The URL on UserBenchmark for the part
}
*/
// This finds the most tested CPU. Just change it from GetCPU() to getGPU(), etc. to get other device types
parts, _ := ubscraper.GetCPU() // Returns a slice of parts with the information above
sort.Slice(parts, func(i, j int) bool { return parts[i].Samples > parts[j].Samples })
fmt.Println(parts[0])
# Functions
GetCPU downloads and unmarshals all CPU information and returns a slice of the parts of type PartInfo.
GetGPU downloads and unmarshals all GPU information and returns a slice of the parts of type PartInfo.
GetHDD downloads and unmarshals all HDD information and returns a slice of the parts of type PartInfo.
GetRAM downloads and unmarshals all RAM information and returns a slice of the parts of type PartInfo.
GetSSD downloads and unmarshals all SSD information and returns a slice of the parts of type PartInfo.
GetUSB downloads and unmarshals all USB information and returns a slice of the parts of type PartInfo.
UnmarshalCSV converts a UserBenchmark CSV into a variable of type PartInfo for easier use.