_id stringlengths 2 7 | title stringclasses 1
value | partition stringclasses 3
values | text stringlengths 6 2.61k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
c21900 | train | // NewMockMath creates a new mock instance | {
"resource": ""
} | ||
c21901 | train | // Sum mocks base method | {
"resource": ""
} | ||
c21902 | train | // Sum indicates an expected call of Sum | {
"resource": ""
} | ||
c21903 | train | // run the given program and parse the output as a model.Package. | {
"resource": ""
} | ||
c21904 | train | // runInDir writes the given program into the given dir, runs it there, and
// parses the output as a model.Package. | {
"resource": ""
} | ||
c21905 | train | // A function that we will test that uses the above interface.
// It takes a list of keys and values, and puts them in the index. | {
"resource": ""
} | ||
c21906 | train | // MinTimes requires the call to occur at least n times. If AnyTimes or MaxTimes have not been called, MinTimes also
// sets the maximum number of calls to infinity. | {
"resource": ""
} | ||
c21907 | train | // MaxTimes limits the number of calls to n times. If AnyTimes or MinTimes have not been called, MaxTimes also
// sets the minimum number of calls to 0. | {
"resource": ""
} | ||
c21908 | train | // Return declares the values to be returned by the mocked function call. | {
"resource": ""
} | ||
c21909 | train | // Times declares the exact number of times a function call is expected to be executed. | {
"resource": ""
} | ||
c21910 | train | // SetArg declares an action that will set the nth argument's value,
// indirected through a pointer. Or, in the case of a slice, SetArg
// will copy value's elements into the nth argument. | {
"resource": ""
} | ||
c21911 | train | // isPreReq returns true if other is a direct or indirect prerequisite to c. | {
"resource": ""
} | ||
c21912 | train | // After declares that the call may only match after preReq has been exhausted. | {
"resource": ""
} | ||
c21913 | train | // dropPrereqs tells the expected Call to not re-check prerequisite calls any
// longer, and to return its current set. | {
"resource": ""
} | ||
c21914 | train | // InOrder declares that the given calls should occur in order. | {
"resource": ""
} | ||
c21915 | train | // sanitize cleans up a string to make a suitable package name. | {
"resource": ""
} | ||
c21916 | train | // The name of the mock type to use for the given interface identifier. | {
"resource": ""
} | ||
c21917 | train | // GenerateMockMethod generates a mock method implementation.
// If non-empty, pkgOverride is the package in which unqualified types reside. | {
"resource": ""
} | ||
c21918 | train | // Output returns the generator's output, formatted in the standard Go style. | {
"resource": ""
} | ||
c21919 | train | // Add adds a new expected call. | {
"resource": ""
} | ||
c21920 | train | // Remove removes an expected call. | {
"resource": ""
} | ||
c21921 | train | // FindMatch searches for a matching call. Returns error with explanation message if no call matched. | {
"resource": ""
} | ||
c21922 | train | // Failures returns the calls that are not satisfied. | {
"resource": ""
} | ||
c21923 | train | // NewMockIndex creates a new mock instance | {
"resource": ""
} | ||
c21924 | train | // Anon mocks base method | {
"resource": ""
} | ||
c21925 | train | // Anon indicates an expected call of Anon | {
"resource": ""
} | ||
c21926 | train | // Chan mocks base method | {
"resource": ""
} | ||
c21927 | train | // ConcreteRet mocks base method | {
"resource": ""
} | ||
c21928 | train | // Ellip indicates an expected call of Ellip | {
"resource": ""
} | ||
c21929 | train | // EllipOnly mocks base method | {
"resource": ""
} | ||
c21930 | train | // ForeignFour mocks base method | {
"resource": ""
} | ||
c21931 | train | // ForeignOne mocks base method | {
"resource": ""
} | ||
c21932 | train | // ForeignThree mocks base method | {
"resource": ""
} | ||
c21933 | train | // ForeignTwo mocks base method | {
"resource": ""
} | ||
c21934 | train | // Func mocks base method | {
"resource": ""
} | ||
c21935 | train | // GetTwo mocks base method | {
"resource": ""
} | ||
c21936 | train | // Map mocks base method | {
"resource": ""
} | ||
c21937 | train | // NillableRet mocks base method | {
"resource": ""
} | ||
c21938 | train | // Other mocks base method | {
"resource": ""
} | ||
c21939 | train | // Ptr mocks base method | {
"resource": ""
} | ||
c21940 | train | // Slice mocks base method | {
"resource": ""
} | ||
c21941 | train | // Struct mocks base method | {
"resource": ""
} | ||
c21942 | train | // StructChan mocks base method | {
"resource": ""
} | ||
c21943 | train | // Summary mocks base method | {
"resource": ""
} | ||
c21944 | train | // Templates mocks base method | {
"resource": ""
} | ||
c21945 | train | // NewMockEmbed creates a new mock instance | {
"resource": ""
} | ||
c21946 | train | // ForeignEmbeddedMethod mocks base method | {
"resource": ""
} | ||
c21947 | train | // ForeignEmbeddedMethod indicates an expected call of ForeignEmbeddedMethod | {
"resource": ""
} | ||
c21948 | train | // ImplicitPackage mocks base method | {
"resource": ""
} | ||
c21949 | train | // ImplicitPackage indicates an expected call of ImplicitPackage | {
"resource": ""
} | ||
c21950 | train | // RegularMethod mocks base method | {
"resource": ""
} | ||
c21951 | train | // NewMockEmbedded creates a new mock instance | {
"resource": ""
} | ||
c21952 | train | // EmbeddedMethod indicates an expected call of EmbeddedMethod | {
"resource": ""
} | ||
c21953 | train | // NewMockMatcher creates a new mock instance | {
"resource": ""
} | ||
c21954 | train | // Matches mocks base method | {
"resource": ""
} | ||
c21955 | train | // Matches indicates an expected call of Matches | {
"resource": ""
} | ||
c21956 | train | // String mocks base method | {
"resource": ""
} | ||
c21957 | train | // parseFile loads all file imports and auxiliary files import into the
// fileParser, parses all file interfaces and returns package model. | {
"resource": ""
} | ||
c21958 | train | // parsePackage loads package specified by path, parses it and populates
// corresponding imports and importedInterfaces into the fileParser. | {
"resource": ""
} | ||
c21959 | train | // importsOfFile returns a map of package name to import path
// of the imports in file. | {
"resource": ""
} | ||
c21960 | train | // Create an iterator over all interfaces in file. | {
"resource": ""
} | ||
c21961 | train | // isVariadic returns whether the function is variadic. | {
"resource": ""
} | ||
c21962 | train | // NewController returns a new Controller. It is the preferred way to create a
// Controller. | {
"resource": ""
} | ||
c21963 | train | // WithContext returns a new Controller and a Context, which is cancelled on any
// fatal failure. | {
"resource": ""
} | ||
c21964 | train | // RecordCall is called by a mock. It should not be called by user code. | {
"resource": ""
} | ||
c21965 | train | // RecordCallWithMethodType is called by a mock. It should not be called by user code. | {
"resource": ""
} | ||
c21966 | train | // Call is called by a mock. It should not be called by user code. | {
"resource": ""
} | ||
c21967 | train | // Finish checks to see if all the methods that were expected to be called
// were called. It should be invoked for each Controller. It is not idempotent
// and therefore can only be invoked once. | {
"resource": ""
} | ||
c21968 | train | // Imports returns the imports needed by the Package as a set of import paths. | {
"resource": ""
} | ||
c21969 | train | // t's Kind must be a reflect.Func. | {
"resource": ""
} | ||
c21970 | train | // ParseMagnetURI parses Magnet-formatted URIs into a Magnet instance | {
"resource": ""
} | ||
c21971 | train | // Load a MetaInfo from an io.Reader. Returns a non-nil error in case of
// failure. | {
"resource": ""
} | ||
c21972 | train | // Convenience function for loading a MetaInfo from a file. | {
"resource": ""
} | ||
c21973 | train | // Encode to bencoded form. | {
"resource": ""
} | ||
c21974 | train | // Set good default values in preparation for creating a new MetaInfo file. | {
"resource": ""
} | ||
c21975 | train | // Creates a Magnet from a MetaInfo. | {
"resource": ""
} | ||
c21976 | train | // Returns the announce list converted from the old single announce field if
// necessary. | {
"resource": ""
} | ||
c21977 | train | // Returns an estimate of the total bytes for all torrents. | {
"resource": ""
} | ||
c21978 | train | // Returns true if the connection is over IPv6. | {
"resource": ""
} | ||
c21979 | train | // Returns whether the left connection should be preferred over the right one,
// considering only their networking properties. If ok is false, we can't
// decide. | {
"resource": ""
} | ||
c21980 | train | // The best guess at number of pieces in the torrent for this peer. | {
"resource": ""
} | ||
c21981 | train | // Correct the PeerPieces slice length. Return false if the existing slice is
// invalid, such as by receiving badly sized BITFIELD, or invalid HAVE
// messages. | {
"resource": ""
} | ||
c21982 | train | // Writes a message into the write buffer. | {
"resource": ""
} | ||
c21983 | train | // The actual value to use as the maximum outbound requests. | {
"resource": ""
} | ||
c21984 | train | // Proxies the messageWriter's response. | {
"resource": ""
} | ||
c21985 | train | // Routine that writes to the peer. Some of what to write is buffered by
// activity elsewhere in the Client, and some is determined locally when the
// connection is writable. | {
"resource": ""
} | ||
c21986 | train | // Emits the indices in the Bitmaps bms in order, never repeating any index.
// skip is mutated during execution, and its initial values will never be
// emitted. | {
"resource": ""
} | ||
c21987 | train | // The connection should download highest priority pieces first, without any
// inclination toward avoiding wastage. Generally we might do this if there's
// a single connection, or this is the fastest connection, and we have active
// readers that signal an ordering preference. It's conceivable that the best
// connec... | {
"resource": ""
} | ||
c21988 | train | // check callers updaterequests | {
"resource": ""
} | ||
c21989 | train | // This is distinct from Torrent piece priority, which is the user's
// preference. Connection piece priority is specific to a connection and is
// used to pseudorandomly avoid connections always requesting the same pieces
// and thus wasting effort. | {
"resource": ""
} | ||
c21990 | train | // After handshake, we know what Torrent and Client stats to include for a
// connection. | {
"resource": ""
} | ||
c21991 | train | // All ConnStats that include this connection. Some objects are not known
// until the handshake is complete, after which it's expected to reconcile the
// differences. | {
"resource": ""
} | ||
c21992 | train | // Returns whether the connection could be useful to us. We're seeding and
// they want data, we don't have metainfo and they can provide it, etc. | {
"resource": ""
} | ||
c21993 | train | // Set both the Reader and Writer for the connection from a single ReadWriter. | {
"resource": ""
} | ||
c21994 | train | // Returns the Reader and Writer as a combined ReadWriter. | {
"resource": ""
} | ||
c21995 | train | // Also handles choking and unchoking of the remote peer. | {
"resource": ""
} | ||
c21996 | train | // Return the range the given IP is in. ok if false if no range is found. | {
"resource": ""
} | ||
c21997 | train | // Return a range that contains ip, or nil. | {
"resource": ""
} | ||
c21998 | train | // Return the range the given IP is in. Returns nil if no range is found. | {
"resource": ""
} | ||
c21999 | train | // Creates an IPList from a line-delimited P2P Plaintext file. | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.