Пример #1
0
func readIntFileIntoCounter(ctr promm.Counter, path string) {
	value, err := readIntFile(path)
	if err != nil {
		log.Printf("Unable to read integer from file %q for counter %v: %v",
			path, *ctr.Desc(), err)
		return
	}
	ctr.Set(float64(value))
}