_id stringlengths 2 7 | title stringclasses 1
value | partition stringclasses 3
values | text stringlengths 6 2.61k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
c14200 | train | // NewLEDDriver returns a LEDDriver interface which allows control
// over the LED subsystem. | {
"resource": ""
} | ||
c14201 | train | // nextSlash will find the index of the next unescaped slash in a string. | {
"resource": ""
} | ||
c14202 | train | // Process reads markdown from the given io.Reader searching for an embedmd
// command. When a command is found, it is executed and the output is written
// into the given io.Writer with the rest of standard markdown. | {
"resource": ""
} | ||
c14203 | train | // WithBaseDir indicates that the given path should be used to resolve relative
// paths. | {
"resource": ""
} | ||
c14204 | train | // WithFetcher provides a custom Fetcher to be used whenever a path or url needs
// to be fetched. | {
"resource": ""
} | ||
c14205 | train | // EncodeHeader writes the CSV header of the provided struct value to the output
// stream. The provided argument v must be a struct value.
//
// The first Encode method call will not write header if EncodeHeader was called
// before it. This method can be called in cases when a data set could be
// empty, but header i... | {
"resource": ""
} | ||
c14206 | train | // NewDecoder returns a new decoder that reads from r.
//
// Decoder will match struct fields according to the given header.
//
// If header is empty NewDecoder will read one line and treat it as a header.
//
// Records coming from r must be of the same length as the header.
//
// NewDecoder may return io.EOF if there ... | {
"resource": ""
} | ||
c14207 | train | // Header returns the first line that came from the reader, or returns the
// defined header by the caller. | {
"resource": ""
} | ||
c14208 | train | // Unused returns a list of column indexes that were not used during decoding
// due to lack of matching struct field. | {
"resource": ""
} | ||
c14209 | train | // Close implements the net.Listener Close method. | {
"resource": ""
} | ||
c14210 | train | // set sets the point in time when the deadline will time out.
// A timeout event is signaled by closing the channel returned by waiter.
// Once a timeout has occurred, the deadline can be refreshed by specifying a
// t value in the future.
//
// A zero value for t prevents timeout. | {
"resource": ""
} | ||
c14211 | train | // wait returns a channel that is closed when the deadline is exceeded. | {
"resource": ""
} | ||
c14212 | train | // Pipe creates a synchronous, in-memory, full duplex
// network connection; both ends implement the Conn interface.
// Reads on one end are matched with writes on the other,
// copying data directly between the two; there is no internal
// buffering. | {
"resource": ""
} | ||
c14213 | train | // BufferSize gets the number of bytes allowed to be queued for
// asynchrnous Write operations.
//
// Please note that this function will always return zero for unbuffered
// connections.
//
// Please see the function SetBufferSize for more information. | {
"resource": ""
} | ||
c14214 | train | // CloseTimeout gets the time.Duration value used when closing buffered
// connections.
//
// Please note that this function will always return zero for
// unbuffered connections.
//
// Please see the function SetCloseTimeout for more information. | {
"resource": ""
} | ||
c14215 | train | // SetCloseTimeout sets a time.Duration value used by the Close function
// to determine the amount of time to wait for pending, buffered Writes
// to complete before closing the connection.
//
// The default timeout value is 10 seconds. A zero value does not
// mean there is no timeout, rather it means the timeout is ... | {
"resource": ""
} | ||
c14216 | train | // Close implements the net.Conn Close method. | {
"resource": ""
} | ||
c14217 | train | // writeAsync performs the Write operation in a goroutine. This
// behavior means the Write operation is not blocking, but also means
// that when Write operations fail the associated error is not returned
// from this function. | {
"resource": ""
} | ||
c14218 | train | // New returns a new Cache that will store files in basePath | {
"resource": ""
} | ||
c14219 | train | // cacheKey returns the cache key for req. | {
"resource": ""
} | ||
c14220 | train | // CachedResponse returns the cached http.Response for req if present, and nil
// otherwise. | {
"resource": ""
} | ||
c14221 | train | // Set saves response resp to the cache with key | {
"resource": ""
} | ||
c14222 | train | // Delete removes key from the cache | {
"resource": ""
} | ||
c14223 | train | // varyMatches will return false unless all of the cached values for the headers listed in Vary
// match the new request | {
"resource": ""
} | ||
c14224 | train | // Date parses and returns the value of the Date header. | {
"resource": ""
} | ||
c14225 | train | // New returns a new Cache that will store leveldb in path | {
"resource": ""
} | ||
c14226 | train | // `\033]0;TITLESTR\007` | {
"resource": ""
} | ||
c14227 | train | // Parse returns a root-level Node parsed from the lines read from r. In
// general, this will be done for you by one of the File constructors. | {
"resource": ""
} | ||
c14228 | train | // ReadFile reads a YAML configuration file from the given filename. | {
"resource": ""
} | ||
c14229 | train | // Config reads a YAML configuration from a static string. If an error is
// found, it will panic. This is a utility function and is intended for use in
// initializers. | {
"resource": ""
} | ||
c14230 | train | // ConfigFile reads a YAML configuration file from the given filename and
// panics if an error is found. This is a utility function and is intended for
// use in initializers. | {
"resource": ""
} | ||
c14231 | train | // Get retrieves a scalar from the file specified by a string of the same
// format as that expected by Child. If the final node is not a Scalar, Get
// will return an error. | {
"resource": ""
} | ||
c14232 | train | // Count retrieves a the number of elements in the specified list from the file
// using the same format as that expected by Child. If the final node is not a
// List, Count will return an error. | {
"resource": ""
} | ||
c14233 | train | // Require retrieves a scalar from the file specified by a string of the same
// format as that expected by Child. If the final node is not a Scalar, String
// will panic. This is a convenience function for use in initializers. | {
"resource": ""
} | ||
c14234 | train | // Get the idx'th item from the List. | {
"resource": ""
} | ||
c14235 | train | // Render returns a string of the node as a YAML document. Note that
// Scalars will have a newline appended if they are rendered directly. | {
"resource": ""
} | ||
c14236 | train | // NotFound is a 404 handler. | {
"resource": ""
} | ||
c14237 | train | // Insert the given middleware into the default Mux's middleware stack. See the
// documentation for web.Mux.Insert for more information. | {
"resource": ""
} | ||
c14238 | train | // Handle adds a route to the default Mux. See the documentation for web.Mux for
// more information about what types this function accepts. | {
"resource": ""
} | ||
c14239 | train | // Connect adds a CONNECT route to the default Mux. See the documentation for
// web.Mux for more information about what types this function accepts. | {
"resource": ""
} | ||
c14240 | train | // Delete adds a DELETE route to the default Mux. See the documentation for
// web.Mux for more information about what types this function accepts. | {
"resource": ""
} | ||
c14241 | train | // Get adds a GET route to the default Mux. See the documentation for web.Mux for
// more information about what types this function accepts. | {
"resource": ""
} | ||
c14242 | train | // Head adds a HEAD route to the default Mux. See the documentation for web.Mux
// for more information about what types this function accepts. | {
"resource": ""
} | ||
c14243 | train | // Options adds a OPTIONS route to the default Mux. See the documentation for
// web.Mux for more information about what types this function accepts. | {
"resource": ""
} | ||
c14244 | train | // Patch adds a PATCH route to the default Mux. See the documentation for web.Mux
// for more information about what types this function accepts. | {
"resource": ""
} | ||
c14245 | train | // Post adds a POST route to the default Mux. See the documentation for web.Mux
// for more information about what types this function accepts. | {
"resource": ""
} | ||
c14246 | train | // Put adds a PUT route to the default Mux. See the documentation for web.Mux for
// more information about what types this function accepts. | {
"resource": ""
} | ||
c14247 | train | // Trace adds a TRACE route to the default Mux. See the documentation for
// web.Mux for more information about what types this function accepts. | {
"resource": ""
} | ||
c14248 | train | // GetReqID returns a request ID from the given context if one is present.
// Returns the empty string if a request ID cannot be found. | {
"resource": ""
} | ||
c14249 | train | // AutomaticOptions automatically return an appropriate "Allow" header when the
// request method is OPTIONS and the request would have otherwise been 404'd. | {
"resource": ""
} | ||
c14250 | train | // ServeHTTPC implements Handler. | {
"resource": ""
} | ||
c14251 | train | // URLQuery is a middleware to parse the URL Query parameters just once,
// and store the resulting url.Values in the context. | {
"resource": ""
} | ||
c14252 | train | // EnvInit is a middleware that allocates an environment map if it is nil. While
// it's impossible in general to ensure that Env is never nil in a middleware
// stack, in most common cases placing this middleware at the top of the stack
// will eliminate the need for repetative nil checks. | {
"resource": ""
} | ||
c14253 | train | // SuperSecure is HTTP Basic Auth middleware for super-secret admin page. Shhhh! | {
"resource": ""
} | ||
c14254 | train | // Sniff attempts to select a sensible default bind string by examining its
// environment. It examines the GOJI_BIND environment variable, Einhorn,
// systemd, and the PORT environment variable, in that order, selecting the
// first plausible option. It returns the empty string if no sensible default
// could be extra... | {
"resource": ""
} | ||
c14255 | train | // Socket parses and binds to the specified address. If Socket encounters an
// error while parsing or binding to the given socket it will exit by calling
// log.Fatal. | {
"resource": ""
} | ||
c14256 | train | // WrapWriter wraps an http.ResponseWriter, returning a proxy that allows you to
// hook into various parts of the response process. | {
"resource": ""
} | ||
c14257 | train | // Accept waits for and returns the next connection to the listener. The
// returned net.Conn's idleness is tracked, and idle connections can be closed
// from the associated T. | {
"resource": ""
} | ||
c14258 | train | // CloseIdle closes all connections that are currently marked as being idle. It,
// however, makes no attempt to wait for in-use connections to die, or to close
// connections which become idle in the future. Call this function if you're
// interested in shedding useless connections, but otherwise wish to continue
// s... | {
"resource": ""
} | ||
c14259 | train | // Drain immediately closes all idle connections, prevents new connections from
// being accepted, and waits for all outstanding connections to finish.
//
// Once a listener has been drained, there is no way to re-enable it. You
// probably want to Close the listener before draining it, otherwise new
// connections wil... | {
"resource": ""
} | ||
c14260 | train | // Disown causes a connection to no longer be tracked by the listener. The
// passed connection must have been returned by a call to Accept from this
// listener. | {
"resource": ""
} | ||
c14261 | train | // MarkIdle marks the given connection as being idle, and therefore eligible for
// closing at any time. The passed connection must have been returned by a call
// to Accept from this listener. | {
"resource": ""
} | ||
c14262 | train | // MarkInUse marks this connection as being in use, removing it from the set of
// connections which are eligible for closing. The passed connection must have
// been returned by a call to Accept from this listener. | {
"resource": ""
} | ||
c14263 | train | // During graceful shutdown, calls to Accept will start returning errors. This
// is inconvenient, since we know these sorts of errors are peaceful, so we
// silently swallow them. | {
"resource": ""
} | ||
c14264 | train | // Write out a representation of the greet | {
"resource": ""
} | ||
c14265 | train | // Write out the user | {
"resource": ""
} | ||
c14266 | train | // New creates a new Mux without any routes or middleware. | {
"resource": ""
} | ||
c14267 | train | // ServeHTTPC creates a context dependent request with the given Mux. Satisfies
// the Handler interface. | {
"resource": ""
} | ||
c14268 | train | // Connect dispatches to the given handler when the pattern matches and the HTTP
// method is CONNECT. | {
"resource": ""
} | ||
c14269 | train | // Delete dispatches to the given handler when the pattern matches and the HTTP
// method is DELETE. | {
"resource": ""
} | ||
c14270 | train | // Head dispatches to the given handler when the pattern matches and the HTTP
// method is HEAD. | {
"resource": ""
} | ||
c14271 | train | // Options dispatches to the given handler when the pattern matches and the HTTP
// method is OPTIONS. | {
"resource": ""
} | ||
c14272 | train | // Patch dispatches to the given handler when the pattern matches and the HTTP
// method is PATCH. | {
"resource": ""
} | ||
c14273 | train | // Post dispatches to the given handler when the pattern matches and the HTTP
// method is POST. | {
"resource": ""
} | ||
c14274 | train | // Put dispatches to the given handler when the pattern matches and the HTTP
// method is PUT. | {
"resource": ""
} | ||
c14275 | train | // Trace dispatches to the given handler when the pattern matches and the HTTP
// method is TRACE. | {
"resource": ""
} | ||
c14276 | train | // Like Serve, but enables TLS using the given config. | {
"resource": ""
} | ||
c14277 | train | // Like Serve, but runs Goji on top of an arbitrary net.Listener. | {
"resource": ""
} | ||
c14278 | train | // getCallStack returns the current call stack information as a string.
// The skip parameter specifies how many top frames should be skipped. | {
"resource": ""
} | ||
c14279 | train | // newRouteGroup creates a new RouteGroup with the given path prefix, router, and handlers. | {
"resource": ""
} | ||
c14280 | train | // Delete adds a DELETE route to the router with the given route path and handlers. | {
"resource": ""
} | ||
c14281 | train | // combineHandlers merges two lists of handlers into a new list. | {
"resource": ""
} | ||
c14282 | train | // Handler creates a routing handler that adds appropriate CORS headers according to the specified options and the request. | {
"resource": ""
} | ||
c14283 | train | // Tag associates some custom data with the route. | {
"resource": ""
} | ||
c14284 | train | // Get adds the route to the router using the GET HTTP method. | {
"resource": ""
} | ||
c14285 | train | // Post adds the route to the router using the POST HTTP method. | {
"resource": ""
} | ||
c14286 | train | // Put adds the route to the router using the PUT HTTP method. | {
"resource": ""
} | ||
c14287 | train | // Patch adds the route to the router using the PATCH HTTP method. | {
"resource": ""
} | ||
c14288 | train | // Delete adds the route to the router using the DELETE HTTP method. | {
"resource": ""
} | ||
c14289 | train | // Connect adds the route to the router using the CONNECT HTTP method. | {
"resource": ""
} | ||
c14290 | train | // Head adds the route to the router using the HEAD HTTP method. | {
"resource": ""
} | ||
c14291 | train | // Options adds the route to the router using the OPTIONS HTTP method. | {
"resource": ""
} | ||
c14292 | train | // Trace adds the route to the router using the TRACE HTTP method. | {
"resource": ""
} | ||
c14293 | train | // URL creates a URL using the current route and the given parameters.
// The parameters should be given in the sequence of name1, value1, name2, value2, and so on.
// If a parameter in the route is not provided a value, the parameter token will remain in the resulting URL.
// The method will perform URL encoding for a... | {
"resource": ""
} | ||
c14294 | train | // String returns the string representation of the route. | {
"resource": ""
} | ||
c14295 | train | // NewContext creates a new Context object with the given response, request, and the handlers.
// This method is primarily provided for writing unit tests for handlers. | {
"resource": ""
} | ||
c14296 | train | // Param returns the named parameter value that is found in the URL path matching the current route.
// If the named parameter cannot be found, an empty string will be returned. | {
"resource": ""
} | ||
c14297 | train | // SetParam sets the named parameter value.
// This method is primarily provided for writing unit tests. | {
"resource": ""
} | ||
c14298 | train | // Set stores the named data item in the context so that it can be retrieved later. | {
"resource": ""
} | ||
c14299 | train | // Query returns the first value for the named component of the URL query parameters.
// If key is not present, it returns the specified default value or an empty string. | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.