diff options
author | Mohamed Attahri <mohamed@attahri.com> | 2020-10-13 02:26:19 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2020-10-14 17:05:21 +0000 |
commit | b95f0b123160a67c9e0b1d8c03993fe1e8208800 (patch) | |
tree | 950beef5ddfeecf3cbd5574be41b6558031c021f /src/io | |
parent | 1671509ea3ff539500c89ba83753ed3caeec3ced (diff) | |
download | go-b95f0b123160a67c9e0b1d8c03993fe1e8208800.tar.gz go-b95f0b123160a67c9e0b1d8c03993fe1e8208800.zip |
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 <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Diffstat (limited to 'src/io')
-rw-r--r-- | src/io/io.go | 8 |
1 files changed, 8 insertions, 0 deletions
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 |