To summarize, there are three main concrete types in the standard library that provide ReadSeeker functionality:
*os.File *bytes.Reader *strings.Reader On Wed, May 15, 2019 at 12:33 PM Sam Mortimer <sam.morti...@gmail.com> wrote: > > There is guru > (https://docs.google.com/document/d/1_Y9xCEMj5S-7rv2ooHpZNH15JgRT5iM742gJkw5LtmQ/edit) > but it's intended for editors not humans. I suppose that means perhaps you > could use one of the editors that uses guru ? > > Regards, > -Sam. > > src/io/io.go:#5381 is where io.ReadSeeker is defined: > > $ guru implements src/io/io.go:#5381 |grep gomaster/src |grep -v _test.go > |sort > gomaster/src/bytes/reader.go:18.6-18.11: is implemented by pointer type > *bytes.Reader > gomaster/src/cmd/compile/internal/gc/iimport.go:241.6-241.17: is implemented > by pointer type *cmd/compile/internal/gc.importReader > gomaster/src/cmd/go/internal/lockedfile/lockedfile.go:24.6-24.9: is > implemented by struct type cmd/go/internal/lockedfile.File > gomaster/src/cmd/go/internal/lockedfile/lockedfile.go:31.6-31.11: is > implemented by struct type cmd/go/internal/lockedfile.osFile > gomaster/src/cmd/go/internal/modfetch/codehost/vcs.go:450.6-450.17: is > implemented by struct type cmd/go/internal/modfetch/codehost.deleteCloser > gomaster/src/debug/elf/reader.go:13.6-13.16: is implemented by struct type > debug/elf.errorReader > gomaster/src/debug/elf/reader.go:37.6-37.25: is implemented by pointer type > *debug/elf.readSeekerFromReader > gomaster/src/go/internal/gcimporter/iimport.go:21.6-21.14: is implemented by > struct type go/internal/gcimporter.intReader > gomaster/src/internal/poll/fd_unix.go:18.6-18.7: is implemented by pointer > type *internal/poll.FD > gomaster/src/io/io.go:115.6-115.11: implements Seeker > gomaster/src/io/io.go:145.6-145.15: interface type ReadSeeker > gomaster/src/io/io.go:157.6-157.20: is implemented by interface type > ReadWriteSeeker > gomaster/src/io/io.go:461.6-461.18: is implemented by pointer type > *SectionReader > gomaster/src/io/io.go:77.6-77.11: implements Reader > gomaster/src/mime/multipart/formdata.go:160.6-160.9: is implemented by > interface type mime/multipart.File > gomaster/src/mime/multipart/formdata.go:169.6-169.22: is implemented by > struct type mime/multipart.sectionReadCloser > gomaster/src/net/http/fs.go:93.6-93.9: is implemented by interface type > net/http.File > gomaster/src/os/exec/exec.go:562.6-562.14: is implemented by struct type > os/exec.closeOnce > gomaster/src/os/types.go:16.6-16.9: is implemented by pointer type *os.File > gomaster/src/strings/reader.go:17.6-17.11: is implemented by pointer type > *strings.Reader > > > On Wednesday, May 15, 2019 at 7:56:17 AM UTC-7, White Hexagon wrote: >> >> I have another strange interface with the Go AWS SDK. The PutObject is >> expecting the data as an: io.ReadSeeker >> >> I imagine there is something implementing this in Go. But my question is >> how would a new user find this information? The go documentation for the >> API just tells me there is a Reader and a Seeker but not what might be >> implementing the interface. I imagine this is difficult to generate since >> there is no explicit keyword 'implements' but I also imagine it is >> documented somewhere? >> >> Cheers >> Peter >> go1.12.1 > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/a4bdba7c-d79c-46e8-9cfc-302444de8262%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAGeFq%2Bn%2BBwhoc65Hm-outBfikd1Dom%2BB3-6DgRnQ3JKwuvORcA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.