Close buffer in #readme example
This commit is contained in:
		
							parent
							
								
									89d7c1f584
								
							
						
					
					
						commit
						e8dbc2aa55
					
				@ -44,6 +44,8 @@ var (
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
func main() {
 | 
					func main() {
 | 
				
			||||||
	buf = buffer.New(100, writeMetrics)
 | 
						buf = buffer.New(100, writeMetrics)
 | 
				
			||||||
 | 
					    defer buf.Close()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	http.HandleFunc("/metrics", handleMetrics)
 | 
						http.HandleFunc("/metrics", handleMetrics)
 | 
				
			||||||
	http.ListenAndServe(":8080", nil)
 | 
						http.ListenAndServe(":8080", nil)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user