Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
metric: fix invalid type check for http.Flusher (#156)
This commit fixes an issue similar to d51a099. The type check: ``` var x { ... flusher: w.(http.Flusher), } ``` panics if `w` does not implement the `http.Flusher` interface. The correct way to check whether `w` implements `http.Flusher` is: ``` var x { ... } if flusher, ok := w.(http.Flusher); ok { x.flusher = flusher } ``` Signed-off-by: Andreas Auernhammer <[email protected]>
- Loading branch information