From: Mohamed Attahri Date: Tue, 13 Oct 2020 02:26:19 +0000 (+0000) Subject: io: add a new ReadSeekCloser interface X-Git-Tag: go1.16beta1~737 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=b95f0b123160a67c9e0b1d8c03993fe1e8208800;p=gostls13.git io: add a new ReadSeekCloser interface Research showed that this interface is defined frequently enough in real-world usage to justify its addition to the standard library. Fixes #40962 Change-Id: I522fe8f9b8753c3fa42ccc1def49611cf88cd340 GitHub-Last-Rev: 6a45be66b42e482a06d9809d9da20c195380988b GitHub-Pull-Request: golang/go#41939 Reviewed-on: https://go-review.googlesource.com/c/go/+/261577 Reviewed-by: Ian Lance Taylor Reviewed-by: Dmitri Shuralyov Trust: Dmitri Shuralyov --- diff --git a/src/io/io.go b/src/io/io.go index 87ebe8c147..4bd1ae913a 100644 --- a/src/io/io.go +++ b/src/io/io.go @@ -152,6 +152,14 @@ type ReadSeeker interface { Seeker } +// ReadSeekCloser is the interface that groups the basic Read, Seek and Close +// methods. +type ReadSeekCloser interface { + Reader + Seeker + Closer +} + // WriteSeeker is the interface that groups the basic Write and Seek methods. type WriteSeeker interface { Writer