OXIESEC PANEL
- Current Dir:
/
/
opt
/
golang
/
1.19.4
/
src
/
testing
/
iotest
Server IP: 2a02:4780:11:1084:0:327f:3464:10
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
12/01/2022 06:13:56 PM
rwxr-xr-x
📄
example_test.go
469 bytes
12/01/2022 06:13:01 PM
rw-r--r--
📄
logger.go
1.26 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
logger_test.go
3.42 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
reader.go
7.94 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
reader_test.go
6.14 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
writer.go
674 bytes
12/01/2022 06:13:01 PM
rw-r--r--
📄
writer_test.go
876 bytes
12/01/2022 06:13:01 PM
rw-r--r--
Editing: example_test.go
Close
// Copyright 2020 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package iotest_test import ( "errors" "fmt" "testing/iotest" ) func ExampleErrReader() { // A reader that always returns a custom error. r := iotest.ErrReader(errors.New("custom error")) n, err := r.Read(nil) fmt.Printf("n: %d\nerr: %q\n", n, err) // Output: // n: 0 // err: "custom error" }