_id
stringlengths
2
7
text
stringlengths
6
2.61k
title
stringclasses
1 value
c14200
// NewLEDDriver returns a LEDDriver interface which allows control // over the LED subsystem.
c14201
// nextSlash will find the index of the next unescaped slash in a string.
c14202
// 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.
c14203
// WithBaseDir indicates that the given path should be used to resolve relative // paths.
c14204
// WithFetcher provides a custom Fetcher to be used whenever a path or url needs // to be fetched.
c14205
// 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...
c14206
// 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 ...
c14207
// Header returns the first line that came from the reader, or returns the // defined header by the caller.
c14208
// Unused returns a list of column indexes that were not used during decoding // due to lack of matching struct field.
c14209
// Close implements the net.Listener Close method.
c14210
// 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.
c14211
// wait returns a channel that is closed when the deadline is exceeded.
c14212
// 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.
c14213
// 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.
c14214
// 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.
c14215
// 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 ...
c14216
// Close implements the net.Conn Close method.
c14217
// 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.
c14218
// New returns a new Cache that will store files in basePath
c14219
// cacheKey returns the cache key for req.
c14220
// CachedResponse returns the cached http.Response for req if present, and nil // otherwise.
c14221
// Set saves response resp to the cache with key
c14222
// Delete removes key from the cache
c14223
// varyMatches will return false unless all of the cached values for the headers listed in Vary // match the new request
c14224
// Date parses and returns the value of the Date header.
c14225
// New returns a new Cache that will store leveldb in path
c14226
// `\033]0;TITLESTR\007`
c14227
// 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.
c14228
// ReadFile reads a YAML configuration file from the given filename.
c14229
// 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.
c14230
// 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.
c14231
// 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.
c14232
// 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.
c14233
// 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.
c14234
// Get the idx'th item from the List.
c14235
// Render returns a string of the node as a YAML document. Note that // Scalars will have a newline appended if they are rendered directly.
c14236
// NotFound is a 404 handler.
c14237
// Insert the given middleware into the default Mux's middleware stack. See the // documentation for web.Mux.Insert for more information.
c14238
// Handle adds a route to the default Mux. See the documentation for web.Mux for // more information about what types this function accepts.
c14239
// Connect adds a CONNECT route to the default Mux. See the documentation for // web.Mux for more information about what types this function accepts.
c14240
// Delete adds a DELETE route to the default Mux. See the documentation for // web.Mux for more information about what types this function accepts.
c14241
// Get adds a GET route to the default Mux. See the documentation for web.Mux for // more information about what types this function accepts.
c14242
// Head adds a HEAD route to the default Mux. See the documentation for web.Mux // for more information about what types this function accepts.
c14243
// Options adds a OPTIONS route to the default Mux. See the documentation for // web.Mux for more information about what types this function accepts.
c14244
// Patch adds a PATCH route to the default Mux. See the documentation for web.Mux // for more information about what types this function accepts.
c14245
// Post adds a POST route to the default Mux. See the documentation for web.Mux // for more information about what types this function accepts.
c14246
// Put adds a PUT route to the default Mux. See the documentation for web.Mux for // more information about what types this function accepts.
c14247
// Trace adds a TRACE route to the default Mux. See the documentation for // web.Mux for more information about what types this function accepts.
c14248
// GetReqID returns a request ID from the given context if one is present. // Returns the empty string if a request ID cannot be found.
c14249
// AutomaticOptions automatically return an appropriate "Allow" header when the // request method is OPTIONS and the request would have otherwise been 404'd.
c14250
// ServeHTTPC implements Handler.
c14251
// URLQuery is a middleware to parse the URL Query parameters just once, // and store the resulting url.Values in the context.
c14252
// 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.
c14253
// SuperSecure is HTTP Basic Auth middleware for super-secret admin page. Shhhh!
c14254
// 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...
c14255
// 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.
c14256
// WrapWriter wraps an http.ResponseWriter, returning a proxy that allows you to // hook into various parts of the response process.
c14257
// 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.
c14258
// 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...
c14259
// 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...
c14260
// 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.
c14261
// 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.
c14262
// 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.
c14263
// 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.
c14264
// Write out a representation of the greet
c14265
// Write out the user
c14266
// New creates a new Mux without any routes or middleware.
c14267
// ServeHTTPC creates a context dependent request with the given Mux. Satisfies // the Handler interface.
c14268
// Connect dispatches to the given handler when the pattern matches and the HTTP // method is CONNECT.
c14269
// Delete dispatches to the given handler when the pattern matches and the HTTP // method is DELETE.
c14270
// Head dispatches to the given handler when the pattern matches and the HTTP // method is HEAD.
c14271
// Options dispatches to the given handler when the pattern matches and the HTTP // method is OPTIONS.
c14272
// Patch dispatches to the given handler when the pattern matches and the HTTP // method is PATCH.
c14273
// Post dispatches to the given handler when the pattern matches and the HTTP // method is POST.
c14274
// Put dispatches to the given handler when the pattern matches and the HTTP // method is PUT.
c14275
// Trace dispatches to the given handler when the pattern matches and the HTTP // method is TRACE.
c14276
// Like Serve, but enables TLS using the given config.
c14277
// Like Serve, but runs Goji on top of an arbitrary net.Listener.
c14278
// getCallStack returns the current call stack information as a string. // The skip parameter specifies how many top frames should be skipped.
c14279
// newRouteGroup creates a new RouteGroup with the given path prefix, router, and handlers.
c14280
// Delete adds a DELETE route to the router with the given route path and handlers.
c14281
// combineHandlers merges two lists of handlers into a new list.
c14282
// Handler creates a routing handler that adds appropriate CORS headers according to the specified options and the request.
c14283
// Tag associates some custom data with the route.
c14284
// Get adds the route to the router using the GET HTTP method.
c14285
// Post adds the route to the router using the POST HTTP method.
c14286
// Put adds the route to the router using the PUT HTTP method.
c14287
// Patch adds the route to the router using the PATCH HTTP method.
c14288
// Delete adds the route to the router using the DELETE HTTP method.
c14289
// Connect adds the route to the router using the CONNECT HTTP method.
c14290
// Head adds the route to the router using the HEAD HTTP method.
c14291
// Options adds the route to the router using the OPTIONS HTTP method.
c14292
// Trace adds the route to the router using the TRACE HTTP method.
c14293
// 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...
c14294
// String returns the string representation of the route.
c14295
// 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.
c14296
// 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.
c14297
// SetParam sets the named parameter value. // This method is primarily provided for writing unit tests.
c14298
// Set stores the named data item in the context so that it can be retrieved later.
c14299
// 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.