OXIESEC PANEL
- Current Dir:
/
/
opt
/
golang
/
1.22.0
/
src
/
errors
Server IP: 2a02:4780:11:1084:0:327f:3464:10
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/02/2024 06:09:55 PM
rwxr-xr-x
📄
errors.go
2.89 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
errors_test.go
765 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
example_test.go
2.16 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
join.go
1.31 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
join_test.go
1.67 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
wrap.go
4.31 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
wrap_test.go
5.95 KB
02/02/2024 06:09:55 PM
rw-r--r--
Editing: errors_test.go
Close
// Copyright 2011 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 errors_test import ( "errors" "testing" ) func TestNewEqual(t *testing.T) { // Different allocations should not be equal. if errors.New("abc") == errors.New("abc") { t.Errorf(`New("abc") == New("abc")`) } if errors.New("abc") == errors.New("xyz") { t.Errorf(`New("abc") == New("xyz")`) } // Same allocation should be equal to itself (not crash). err := errors.New("jkl") if err != err { t.Errorf(`err != err`) } } func TestErrorMethod(t *testing.T) { err := errors.New("abc") if err.Error() != "abc" { t.Errorf(`New("abc").Error() = %q, want %q`, err.Error(), "abc") } }