simplify code with http.Flusher type conversion (#325)

* simplify code with http.Flusher type conversion

* simplify code with http.Flusher type conversion, better version
This commit is contained in:
Kevin Wan
2020-12-29 10:25:55 +08:00
committed by GitHub
parent 0bd2a0656c
commit e97e1f10db
8 changed files with 29 additions and 32 deletions

View File

@@ -43,7 +43,7 @@ func TestAuthHandler(t *testing.T) {
assert.Nil(t, err)
flusher, ok := w.(http.Flusher)
assert.Equal(t, ok, true)
assert.True(t, ok)
flusher.Flush()
}))