_id
stringlengths
2
7
text
stringlengths
6
2.61k
title
stringclasses
1 value
c12200
// AddFlag adds the flag represented by VerifyFlag to the specified pflag.FlagSet. Returns the pointer to the value that // can be used to retrieve the value.
c12201
// ConfigVersion unmarshals the provided bytes as YAML and returns the value of the top-level "version" key. The value // of this key must be a string. If the input is valid YAML but does not contain a "version" key, returns the empty // string. Returns an error if the input is not valid YAML or cannot be unmarshaled a...
c12202
// Move the file or directory at src to dst. Conceptually, this is equivalent to executing "mv src dst". dst must not // already exist and the path up to it must already exist. Uses os.Rename to execute the move, which means that there // may be platform-specific restrictions such as not being able to move the director...
c12203
// CopyDir recursively copies the src directory to the path specified by dst. dst must not already exist and the path up // to it must already exist.
c12204
// SyncDirAdditive copies all of the files and directories in src that are not in dst. Directories that are present in // both are handled recursively. Basically a recursive merge with source preservation.
c12205
// verifyDstPathSafe verifies that the provided destination path does not exist, but that the path to its parent does.
c12206
// Download downloads the provided package to the specified path. The parent directory of the path must exist. If the // destination file already exists, it is overwritten. The download progress is written to the provided writer.
c12207
// ListProjectPaths lists all of the paths in the provided project directory that matches the provided include matcher // and does not match the provided exclude matcher. The paths are relative to the current working directory.
c12208
// AllPaths returns a map that contains all of the paths in the provided directory. The paths are relative to the // directory. The boolean key is true if the path is a directory, false otherwise.
c12209
// Computes the SHA-256 hash for the content of the provided reader, which must be a plugin TGZ.
c12210
// ProjectDir returns the project directory for the global configuration. Returns an error if the wrapper path was not // specified.
c12211
// Get the index of precision p from the sparse representation.
c12212
// Merge tmpSet and sparseList in the sparse representation. // Converts to normal if the sparse list is too large
c12213
// NewPlus returns a new initialized HyperLogLogPlus that uses the HyperLogLog++ // algorithm.
c12214
// Clear sets HyperLogLogPlus h back to its initial state.
c12215
// Converts HyperLogLogPlus h to the normal representation from the sparse // representation.
c12216
// Add adds a new item to HyperLogLogPlus h.
c12217
// Merge takes another HyperLogLogPlus and combines it with HyperLogLogPlus h.
c12218
// Merges tmpSet if it exceeds the threshold
c12219
// Estimates the bias using empirically determined values.
c12220
// Encode HyperLogLogPlus into a gob
c12221
// Decode gob into a HyperLogLogPlus structure
c12222
// Extract bits from uint32 using LSB 0 numbering, including lo.
c12223
// Extract bits from uint64 using LSB 0 numbering, including lo.
c12224
// New returns a new initialized HyperLogLog.
c12225
// Add adds a new item to HyperLogLog h.
c12226
// Merge takes another HyperLogLog and combines it with HyperLogLog h.
c12227
// Encode HyperLogLog into a gob
c12228
// Decode gob into a HyperLogLog structure
c12229
// String returns the hash' name.
c12230
// ToHash returns the hash whose name is s. It returns zero if there is no // such hash. It is case sensitive.
c12231
// NewStreamLexerSize returns a new StreamLexer for a given io.Reader and estimated required buffer size. // If the io.Reader implements Bytes, that buffer is used instead.
c12232
// Err returns the error returned from io.Reader. It may still return valid bytes for a while though.
c12233
// Shift returns the bytes of the current selection and collapses the position to the end of the selection. // It also returns the number of bytes we moved since the last call to Shift. This can be used in calls to Free.
c12234
// ShiftLen returns the number of bytes moved since the last call to ShiftLen. This can be used in calls to Free because it takes into account multiple Shifts or Skips.
c12235
// NewLexerBytes returns a new Lexer for a given io.Reader, and uses ioutil.ReadAll to read it into a byte slice. // If the io.Reader implements Bytes, that is used instead. // It will append a NULL at the end of the buffer.
c12236
// NewLexerBytes returns a new Lexer for a given byte slice, and appends NULL at the end. // To avoid reallocation, make sure the capacity has room for one more byte.
c12237
// Restore restores the replaced byte past the end of the buffer by NULL.
c12238
// Peek returns the ith byte relative to the end position. // Peek returns 0 when an error has occurred, Err returns the error.
c12239
// Shift returns the bytes of the current selection and collapses the position to the end of the selection.
c12240
// Dimension parses a byte-slice and returns the length of the number and its unit.
c12241
// Mediatype parses a given mediatype and splits the mimetype from the parameters. // It works similar to mime.ParseMediaType but is faster.
c12242
// DataURI parses the given data URI and returns the mediatype, data and ok.
c12243
// NewParser returns a new CSS parser from an io.Reader. isInline specifies whether this is an inline style attribute.
c12244
// Err returns the error encountered during parsing, this is often io.EOF but also other errors can be returned.
c12245
// Write writes bytes from the given byte slice and returns the number of bytes written and an error if occurred. When err != nil, n == 0.
c12246
// IsIdent returns true if the bytes are a valid identifier.
c12247
// IsURLUnquoted returns true if the bytes are a valid unquoted URL.
c12248
// EscapeAttrVal returns the escape attribute value bytes without quotes.
c12249
// EscapeCDATAVal returns the escaped text bytes.
c12250
// Copy returns a copy of the given byte slice.
c12251
// ToLower converts all characters in the byte slice from A-Z to a-z.
c12252
// IsAllWhitespace returns true when the entire byte slice consists of space, \n, \r, \t, \f.
c12253
// TrimWhitespace removes any leading and trailing whitespace characters.
c12254
// AppendPrice will append an int64 formatted as a price, where the int64 is the price in cents. // It does not display whether a price is negative or not.
c12255
// Err returns the error encountered during lexing, this is often io.EOF but also other errors can be returned.
c12256
// shiftXml parses the content of a svg or math tag according to the XML 1.1 specifications, including the tag itself. // So far we have already parsed `<svg` or `<math`.
c12257
// Position returns the line and column number for a certain position in a file. It is useful for recovering the position in a file that caused an error. // It only treates \n, \r, and \r\n as newlines, which might be different from some languages also recognizing \f, \u2028, and \u2029 to be newlines.
c12258
// Read reads bytes into the given byte slice and returns the number of bytes read and an error if occurred.
c12259
// Int parses a byte-slice and returns the integer it represents. // If an invalid character is encountered, it will stop there.
c12260
// Float parses a byte-slice and returns the float it represents. // If an invalid character is encountered, it will stop there.
c12261
// NewError creates a new error
c12262
// NewErrorLexer creates a new error from an active Lexer.
c12263
// Positions re-parses the file to determine the line, column, and context of the error. // Context is the entire line at which the error occurred.
c12264
// Error returns the error string, containing the context and line + column number.
c12265
// consumeBracket consumes any bracket token.
c12266
// consumeNumeric consumes NumberToken, PercentageToken or DimensionToken.
c12267
// consumeString consumes a string and may return BadStringToken when a newline is encountered.
c12268
// consumeRemnantsBadUrl consumes bytes of a BadUrlToken so that normal tokenization may continue.
c12269
// consumeIdentlike consumes IdentToken, FunctionToken or UrlToken.
c12270
// String returns the string representation of a State.
c12271
// NewParser returns a new Parser for a given io.Reader.
c12272
// Err returns the error encountered during tokenization, this is often io.EOF but also other errors can be returned.
c12273
// EscapeAttrVal returns the escaped attribute value bytes without quotes.
c12274
// NewKeymap creates a new Keymap struct
c12275
// LookupAction returns the appropriate action for the given termbox event
c12276
// ApplyKeybinding applies all of the custom key bindings on top of // the default key bindings
c12277
// LineAt returns the line at index `i`. Note that the i-th element // in this filtered buffer may actually correspond to a totally // different line number in the source buffer.
c12278
// EventToString returns human readable name for a given termbox.Event
c12279
// NewExternalCmd creates a new filter that uses an external // command to filter the input
c12280
// NewHub creates a new Hub struct
c12281
// low-level utility
c12282
// SendQuery sends the query string to be processed by the Filter
c12283
// SendDraw sends a request to redraw the terminal display
c12284
// SendStatusMsgAndClear sends a string to be displayed in the status message, // as well as a delay until the message should be cleared
c12285
// SendPaging sends a request to move the cursor around
c12286
// Flush calls termbox.Flush
c12287
// PollEvent returns a channel that you can listen to for // termbox's events. The actual polling is done in a // separate gouroutine
c12288
// SetCell writes to the terminal
c12289
// Size returns the dimensions of the current terminal
c12290
// Runes returns a channel that gives you the list of runes in the query
c12291
// Execute fulfills the Action interface for AfterFunc
c12292
// Register fulfills the Action interface for AfterFunc. Registers `a` // into the global action registry by the name `name`, and maps to // default keys via `defaultKeys`
c12293
// RegisterKeySequence satisfies the Action interface for AfterFunc. // Registers the action to be mapped against a key sequence
c12294
// This is an exception to the rule. This does not get registered // anywhere. You just call it directly
c12295
// IsEndMark is an utility function that checks if the given error // object is an EndMark
c12296
// Send sends the data `v` through this channel
c12297
// SendEndMark sends an end mark
c12298
// SetSource sets the source. // If called during `Run`, this method will block.
c12299
// Add adds new Acceptor that work on data that goes through the Pipeline. // If called during `Run`, this method will block.