From a3edafb7560c58c51e939852fbb7d300e9171513 Mon Sep 17 00:00:00 2001 From: asandikci Date: Mon, 31 Jul 2023 10:20:39 +0300 Subject: [PATCH] exercise1: reader --- exercises/readers.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 exercises/readers.go diff --git a/exercises/readers.go b/exercises/readers.go new file mode 100644 index 0000000..895e113 --- /dev/null +++ b/exercises/readers.go @@ -0,0 +1,13 @@ +package main + +//import "golang.org/x/tour/reader" + +type MyReader struct{} + +func (ret MyReader) Read(b []byte) (int, error) { + copy(b, "A") + return 1, nil +} +func main() { + //reader.Validate(MyReader{}) +}