mirror of
				https://github.com/prometheus/node_exporter.git
				synced 2025-08-20 18:33:52 -07:00 
			
		
		
		
	fix:use %w to wrap error (#3345)
Signed-off-by: mengxun <mengxun1122@163.com> Signed-off-by: Shashwat Hiregoudar <shashwat.h@flipkart.com>
This commit is contained in:
		
							parent
							
								
									3ad608989a
								
							
						
					
					
						commit
						5919d9d15c
					
				| 
						 | 
					@ -44,7 +44,7 @@ func NewMeminfoCollector(logger *slog.Logger) (Collector, error) {
 | 
				
			||||||
func (c *meminfoCollector) getMemInfo() (map[string]float64, error) {
 | 
					func (c *meminfoCollector) getMemInfo() (map[string]float64, error) {
 | 
				
			||||||
	meminfo, err := c.fs.Meminfo()
 | 
						meminfo, err := c.fs.Meminfo()
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		return nil, fmt.Errorf("failed to get memory info: %s", err)
 | 
							return nil, fmt.Errorf("failed to get memory info: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	metrics := make(map[string]float64)
 | 
						metrics := make(map[string]float64)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue