()
| 131 | } |
| 132 | |
| 133 | func readPrometheusDoc() ([]byte, error) { |
| 134 | doc, err := os.ReadFile(prometheusDocFile) |
| 135 | if err != nil { |
| 136 | return nil, err |
| 137 | } |
| 138 | return doc, nil |
| 139 | } |
| 140 | |
| 141 | func updatePrometheusDoc(doc []byte, metricFamilies []*dto.MetricFamily) ([]byte, error) { |
| 142 | i := bytes.Index(doc, generatorPrefix) |