This file is indexed.

/usr/share/gocode/src/github.com/stretchr/testify/require/doc.go is in golang-github-stretchr-testify-dev 1.0-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
// Alternative testing tools which stop test execution if test failed.
//
// Example Usage
//
// The following is a complete example using require in a standard test function:
//    import (
//      "testing"
//      "github.com/stretchr/testify/require"
//    )
//
//    func TestSomething(t *testing.T) {
//
//      var a string = "Hello"
//      var b string = "Hello"
//
//      require.Equal(t, a, b, "The two words should be the same.")
//
//    }
//
// Assertions
//
// The `require` package have same global functions as in the `assert` package,
// but instead of returning a boolean result they call `t.FailNow()`.
//
// Every assertion function also takes an optional string message as the final argument,
// allowing custom error messages to be appended to the message the assertion method outputs.
//
// Here is an overview of the assert functions:
//
//    require.Equal(t, expected, actual [, message [, format-args])
//
//    require.NotEqual(t, notExpected, actual [, message [, format-args]])
//
//    require.True(t, actualBool [, message [, format-args]])
//
//    require.False(t, actualBool [, message [, format-args]])
//
//    require.Nil(t, actualObject [, message [, format-args]])
//
//    require.NotNil(t, actualObject [, message [, format-args]])
//
//    require.Empty(t, actualObject [, message [, format-args]])
//
//    require.NotEmpty(t, actualObject [, message [, format-args]])
//
//    require.Error(t, errorObject [, message [, format-args]])
//
//    require.NoError(t, errorObject [, message [, format-args]])
//
//    require.EqualError(t, theError, errString [, message [, format-args]])
//
//    require.Implements(t, (*MyInterface)(nil), new(MyObject) [,message [, format-args]])
//
//    require.IsType(t, expectedObject, actualObject [, message [, format-args]])
//
//    require.Contains(t, string, substring [, message [, format-args]])
//
//    require.NotContains(t, string, substring [, message [, format-args]])
//
//    require.Panics(t, func(){
//
//	    // call code that should panic
//
//    } [, message [, format-args]])
//
//    require.NotPanics(t, func(){
//
//	    // call code that should not panic
//
//    } [, message [, format-args]])
//
//    require.WithinDuration(t, timeA, timeB, deltaTime, [, message [, format-args]])
//
//    require.InDelta(t, numA, numB, delta, [, message [, format-args]])
//
//    require.InEpsilon(t, numA, numB, epsilon, [, message [, format-args]])
package require