types: add EmptyBody

Change-Id: Ic0cc6cae6debb20fbc15bd95692e8565171eae49
This commit is contained in:
Brad Fitzpatrick 2014-03-31 09:36:08 -07:00
parent bfb076ab95
commit bf4426e35e
1 changed files with 4 additions and 0 deletions

View File

@ -40,6 +40,10 @@ var (
// NopCloser is an io.Closer that does nothing.
var NopCloser io.Closer = ioutil.NopCloser(nil)
// EmptyBody is a ReadCloser that returns EOF on Read and does nothing
// on Close.
var EmptyBody io.ReadCloser = ioutil.NopCloser(strings.NewReader(""))
// Time3339 is a time.Time which encodes to and from JSON
// as an RFC 3339 time in UTC.
type Time3339 time.Time