_id stringlengths 2 7 | title stringclasses 1
value | partition stringclasses 3
values | text stringlengths 6 2.61k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
c8600 | train | // SetHeaders sets a map of header fields in the mock response. | {
"resource": ""
} | ||
c8601 | train | // Body sets the HTTP response body to be used. | {
"resource": ""
} | ||
c8602 | train | // BodyString defines the response body as string. | {
"resource": ""
} | ||
c8603 | train | // JSON defines the response body based on a JSON based input. | {
"resource": ""
} | ||
c8604 | train | // SetError defines the response simulated error. | {
"resource": ""
} | ||
c8605 | train | // Delay defines the response simulated delay.
// This feature is still experimental and will be improved in the future. | {
"resource": ""
} | ||
c8606 | train | // Map adds a new response mapper function to map http.Response before the matching process. | {
"resource": ""
} | ||
c8607 | train | // New creates and registers a new HTTP mock with
// default settings and returns the Request DSL for HTTP mock
// definition and set up. | {
"resource": ""
} | ||
c8608 | train | // RestoreClient allows the developer to disable and restore the
// original transport in the given http.Client. | {
"resource": ""
} | ||
c8609 | train | // Observe provides a hook to support inspection of the request and matched mock | {
"resource": ""
} | ||
c8610 | train | // NetworkingFilter determines if an http.Request should be triggered or not. | {
"resource": ""
} | ||
c8611 | train | // NewMock creates a new HTTP mock based on the given request and response instances.
// It's mostly used internally. | {
"resource": ""
} | ||
c8612 | train | // Done returns true in case that the current mock
// instance is disabled and therefore must be removed. | {
"resource": ""
} | ||
c8613 | train | // Match matches the given http.Request with the current Request
// mock expectation, returning true if matches. | {
"resource": ""
} | ||
c8614 | train | // decrement decrements the current mock Request counter. | {
"resource": ""
} | ||
c8615 | train | // PredictFilesSet predict according to file rules to a given set of file names | {
"resource": ""
} | ||
c8616 | train | // File returns true if prefix can match the file | {
"resource": ""
} | ||
c8617 | train | // Directory gives the directory of the current written
// last argument if it represents a file name being written.
// in case that it is not, we fall back to the current directory. | {
"resource": ""
} | ||
c8618 | train | // predictPackages completes packages in the directory pointed by a.Last
// and packages that are one level below that package. | {
"resource": ""
} | ||
c8619 | train | // listPackages looks in current pointed dir and in all it's direct sub-packages
// and return a list of paths to go packages. | {
"resource": ""
} | ||
c8620 | train | // Run runs the completion and add installation flags beforehand.
// The flags are added to the main flag CommandLine variable. | {
"resource": ""
} | ||
c8621 | train | // Predict returns all possible predictions for args according to the command struct | {
"resource": ""
} | ||
c8622 | train | // Predict completion of sub command names names according to command line arguments | {
"resource": ""
} | ||
c8623 | train | // Predict completion of flags names according to command line arguments | {
"resource": ""
} | ||
c8624 | train | // predict options
// only is set to true if no more options are allowed to be returned
// those are in cases of special flag that has specific completion arguments,
// and other flags or sub commands can't come after it. | {
"resource": ""
} | ||
c8625 | train | // fixPathForm changes a file name to a relative name | {
"resource": ""
} | ||
c8626 | train | // Run is used when running complete in command line mode.
// this is used when the complete is not completing words, but to
// install it or uninstall it. | {
"resource": ""
} | ||
c8627 | train | // prompt use for approval
// exit if approval was not given | {
"resource": ""
} | ||
c8628 | train | // AddFlags adds the CLI flags to the flag set.
// If flags is nil, the default command line flags will be taken.
// Pass non-empty strings as installName and uninstallName to override the default
// flag names. | {
"resource": ""
} | ||
c8629 | train | // validate the CLI | {
"resource": ""
} | ||
c8630 | train | // PredictOr unions two predicate functions, so that the result predicate
// returns the union of their predication | {
"resource": ""
} | ||
c8631 | train | // Predict invokes the predict function and implements the Predictor interface | {
"resource": ""
} | ||
c8632 | train | // New returns a new Sling with an http DefaultClient. | {
"resource": ""
} | ||
c8633 | train | // Http Client
// Client sets the http Client used to do requests. If a nil client is given,
// the http.DefaultClient will be used. | {
"resource": ""
} | ||
c8634 | train | // Doer sets the custom Doer implementation used to do requests.
// If a nil client is given, the http.DefaultClient will be used. | {
"resource": ""
} | ||
c8635 | train | // Method
// Head sets the Sling method to HEAD and sets the given pathURL. | {
"resource": ""
} | ||
c8636 | train | // Get sets the Sling method to GET and sets the given pathURL. | {
"resource": ""
} | ||
c8637 | train | // Post sets the Sling method to POST and sets the given pathURL. | {
"resource": ""
} | ||
c8638 | train | // Put sets the Sling method to PUT and sets the given pathURL. | {
"resource": ""
} | ||
c8639 | train | // Patch sets the Sling method to PATCH and sets the given pathURL. | {
"resource": ""
} | ||
c8640 | train | // Delete sets the Sling method to DELETE and sets the given pathURL. | {
"resource": ""
} | ||
c8641 | train | // Options sets the Sling method to OPTIONS and sets the given pathURL. | {
"resource": ""
} | ||
c8642 | train | // Trace sets the Sling method to TRACE and sets the given pathURL. | {
"resource": ""
} | ||
c8643 | train | // Connect sets the Sling method to CONNECT and sets the given pathURL. | {
"resource": ""
} | ||
c8644 | train | // Header
// Add adds the key, value pair in Headers, appending values for existing keys
// to the key's values. Header keys are canonicalized. | {
"resource": ""
} | ||
c8645 | train | // Set sets the key, value pair in Headers, replacing existing values
// associated with key. Header keys are canonicalized. | {
"resource": ""
} | ||
c8646 | train | // SetBasicAuth sets the Authorization header to use HTTP Basic Authentication
// with the provided username and password. With HTTP Basic Authentication
// the provided username and password are not encrypted. | {
"resource": ""
} | ||
c8647 | train | // Url
// Base sets the rawURL. If you intend to extend the url with Path,
// baseUrl should be specified with a trailing slash. | {
"resource": ""
} | ||
c8648 | train | // Path extends the rawURL with the given path by resolving the reference to
// an absolute URL. If parsing errors occur, the rawURL is left unmodified. | {
"resource": ""
} | ||
c8649 | train | // BodyProvider sets the Sling's body provider. | {
"resource": ""
} | ||
c8650 | train | // Requests
// Request returns a new http.Request created with the Sling properties.
// Returns any errors parsing the rawURL, encoding query structs, encoding
// the body, or creating the http.Request. | {
"resource": ""
} | ||
c8651 | train | // addQueryStructs parses url tagged query structs using go-querystring to
// encode them to url.Values and format them onto the url.RawQuery. Any
// query parsing or encoding errors are returned. | {
"resource": ""
} | ||
c8652 | train | // addHeaders adds the key, value pairs from the given http.Header to the
// request. Values for existing keys are appended to the keys values. | {
"resource": ""
} | ||
c8653 | train | // Sending
// ResponseDecoder sets the Sling's response decoder. | {
"resource": ""
} | ||
c8654 | train | // Decode decodes the Response Body into the value pointed to by v.
// Caller must provide a non-nil v and close the resp.Body. | {
"resource": ""
} | ||
c8655 | train | // NewIssueService returns a new IssueService. | {
"resource": ""
} | ||
c8656 | train | // List returns the authenticated user's issues across repos and orgs. | {
"resource": ""
} | ||
c8657 | train | // ListByRepo returns a repository's issues. | {
"resource": ""
} | ||
c8658 | train | // Create creates a new issue on the specified repository. | {
"resource": ""
} | ||
c8659 | train | // Sum64 computes the 64-bit xxHash digest of b. | {
"resource": ""
} | ||
c8660 | train | // Reset clears the Digest's state so that it can be reused. | {
"resource": ""
} | ||
c8661 | train | // Sum appends the current hash to b and returns the resulting slice. | {
"resource": ""
} | ||
c8662 | train | // Sum64 returns the current hash. | {
"resource": ""
} | ||
c8663 | train | // DEPRECATED. RateLimit creates a Throttler that conforms to the given
// rate limits | {
"resource": ""
} | ||
c8664 | train | // Select the specified database index. | {
"resource": ""
} | ||
c8665 | train | // RateLimit checks whether a particular key has exceeded a rate
// limit. It also returns a RateLimitResult to provide additional
// information about the state of the RateLimiter.
//
// If the rate limit has not been exceeded, the underlying storage is
// updated by the supplied quantity. For example, a quantity of 1... | {
"resource": ""
} | ||
c8666 | train | // RateLimit wraps an http.Handler to limit incoming requests.
// Requests that are not limited will be passed to the handler
// unchanged. Limited requests will be passed to the DeniedHandler.
// X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset and
// Retry-After headers will be written to the response bas... | {
"resource": ""
} | ||
c8667 | train | // GetWithTime returns the value of the key if it is in the store or
// -1 if it does not exist. It also returns the current local time on
// the machine. | {
"resource": ""
} | ||
c8668 | train | // SetIfNotExistsWithTTL sets the value of key only if it is not
// already set in the store it returns whether a new value was set. It
// ignores the ttl. | {
"resource": ""
} | ||
c8669 | train | // CompareAndSwapWithTTL atomically compares the value at key to the
// old value. If it matches, it sets it to the new value and returns
// true. Otherwise, it returns false. If the key does not exist in the
// store, it returns false with no error. It ignores the ttl. | {
"resource": ""
} | ||
c8670 | train | // Key returns the key for this request based on the criteria defined by the VaryBy struct. | {
"resource": ""
} | ||
c8671 | train | // DEPRECATED. NewMemStore is a compatible alias for mem.New | {
"resource": ""
} | ||
c8672 | train | // DEPRECATED. NewMemStore is a compatible alias for redis.New | {
"resource": ""
} | ||
c8673 | train | // NewException constructs an Exception using provided Error and Stacktrace | {
"resource": ""
} | ||
c8674 | train | // Culprit tries to read top-most error message from Exception's stacktrace | {
"resource": ""
} | ||
c8675 | train | // WrapWithExtra adds extra data to an error before reporting to Sentry | {
"resource": ""
} | ||
c8676 | train | // Iteratively fetches all the Extra data added to an error,
// and it's underlying errors. Extra data defined first is
// respected, and is not overridden when extracting. | {
"resource": ""
} | ||
c8677 | train | // Culprit iterates through stacktrace frames and returns first in-app frame's information | {
"resource": ""
} | ||
c8678 | train | // NewStacktrace intializes and populates a new stacktrace, skipping skip frames.
//
// context is the number of surrounding lines that should be included for context.
// Setting context to 3 would try to get seven lines. Setting context to -1 returns
// one line with no surrounding context, and 0 returns no context.
/... | {
"resource": ""
} | ||
c8679 | train | // NewStacktraceFrame builds a single frame using data returned from runtime.Caller.
//
// context is the number of surrounding lines that should be included for context.
// Setting context to 3 would try to get seven lines. Setting context to -1 returns
// one line with no surrounding context, and 0 returns no context... | {
"resource": ""
} | ||
c8680 | train | // Determines whether frame should be marked as InApp | {
"resource": ""
} | ||
c8681 | train | // Retrieve the name of the package and function containing the PC. | {
"resource": ""
} | ||
c8682 | train | // Try to trim the GOROOT or GOPATH prefix off of a filename | {
"resource": ""
} | ||
c8683 | train | // MarshalJSON returns the JSON encoding of a timestamp | {
"resource": ""
} | ||
c8684 | train | // UnmarshalJSON sets timestamp to parsed JSON data | {
"resource": ""
} | ||
c8685 | train | // Format return timestamp in configured timestampFormat | {
"resource": ""
} | ||
c8686 | train | // MarshalJSON returns the JSON encoding of a tag | {
"resource": ""
} | ||
c8687 | train | // UnmarshalJSON sets tag to parsed JSON data | {
"resource": ""
} | ||
c8688 | train | // UnmarshalJSON sets tags to parsed JSON data | {
"resource": ""
} | ||
c8689 | train | // NewPacket constructs a packet with the specified message and interfaces. | {
"resource": ""
} | ||
c8690 | train | // NewPacketWithExtra constructs a packet with the specified message, extra information, and interfaces. | {
"resource": ""
} | ||
c8691 | train | // AddTags appends new tags to the existing ones | {
"resource": ""
} | ||
c8692 | train | // JSON encodes packet into JSON format that will be sent to the server | {
"resource": ""
} | ||
c8693 | train | // Return a list of interfaces to be used in appending with the rest | {
"resource": ""
} | ||
c8694 | train | // New constructs a new Sentry client instance | {
"resource": ""
} | ||
c8695 | train | // NewWithTags constructs a new Sentry client instance with default tags. | {
"resource": ""
} | ||
c8696 | train | // SetIgnoreErrors updates ignoreErrors config on given client | {
"resource": ""
} | ||
c8697 | train | // SetDSN updates a client with a new DSN. It safe to call after and
// concurrently with calls to Report and Send. | {
"resource": ""
} | ||
c8698 | train | // SetRelease sets the "release" tag. | {
"resource": ""
} | ||
c8699 | train | // SetEnvironment sets the "environment" tag. | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.