_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c12000
train
// Copy is a file copy helper. Files will be copied to their destination, // overwriting existing files. Already existing files that are not part of the // copy process will not be touched. If source is a directory it is walked // recursively. Non-existing folders in dest will be created. // Copy returns upon the first...
{ "resource": "" }
c12001
train
// Int64 converts any signed number type to an int64. // The second parameter is returned as false if a non-number type was given.
{ "resource": "" }
c12002
train
// Uint64 converts any unsigned number type to an uint64. // The second parameter is returned as false if a non-number type was given.
{ "resource": "" }
c12003
train
// Float32 converts any number type to an float32. // The second parameter is returned as false if a non-number type was given.
{ "resource": "" }
c12004
train
// UnsafeCopy will copy data from src to dst while ignoring type information. // Both types need to be of the same size and dst and src have to be pointers. // UnsafeCopy will panic if these requirements are not met.
{ "resource": "" }
c12005
train
// SetMemberByName sets member name of the given pointer-to-struct to the data // passed to this function. The member may be private, too.
{ "resource": "" }
c12006
train
// SetMemberByIndex sets member idx of the given pointer-to-struct to the data // passed to this function. The member may be private, too.
{ "resource": "" }
c12007
train
// Write writes data to the wrapped slice if there is enough space available. // If not, data is written until the wrapped slice has reached its capacity // and io.EOF is returned.
{ "resource": "" }
c12008
train
// NewTransition creates a new transition to a given state.
{ "resource": "" }
c12009
train
// NewTransitionParser creates a new transition based parser
{ "resource": "" }
c12010
train
// GetStateID creates a hash from the given state name. // Empty state names will be translated to ParserStateStop.
{ "resource": "" }
c12011
train
// GetStateName returns the name for the given state id or an empty string if // the id could not be found.
{ "resource": "" }
c12012
train
// AddDirectives is a convenience function to add multiple transitions in as a // batch.
{ "resource": "" }
c12013
train
// Add adds a new transition to a given parser state.
{ "resource": "" }
c12014
train
// Stop adds a stop transition to a given parser state.
{ "resource": "" }
c12015
train
// AddTransition adds a transition from a given state to the map
{ "resource": "" }
c12016
train
// Parse starts parsing at a given stateID. // This function returns the remaining parts of data that did not match a // transition as well as the last state the parser has been set to.
{ "resource": "" }
c12017
train
// SplitAddressToURI acts like SplitAddress but returns an URI struct instead.
{ "resource": "" }
c12018
train
// IsDisconnectedError returns true if the given error is related to a // disconnected socket.
{ "resource": "" }
c12019
train
// String implements the stringer interface for CursorPosition
{ "resource": "" }
c12020
train
// Add increments the waitgroup counter by the given value. // Delta may be negative.
{ "resource": "" }
c12021
train
// IncWhenDone wait until the counter is exactly 0 and triggeres an increment // if this is found to be true
{ "resource": "" }
c12022
train
// Wait blocks until the counter is 0 or less.
{ "resource": "" }
c12023
train
// WaitFor blocks until the counter is 0 or less. If the block takes longer than // the given timeout, WaitFor will return false. If duration is 0, Wait is called.
{ "resource": "" }
c12024
train
// Write caches the passed message. Blocked by flush function.
{ "resource": "" }
c12025
train
// Flush writes all messages to the given writer and clears the list // of stored messages. Blocks Write function.
{ "resource": "" }
c12026
train
// Get returns a slice allocated to a normalized size. // Sizes are organized in evenly sized buckets so that fragmentation is kept low.
{ "resource": "" }
c12027
train
// ReturnAfter calls a function. If that function does not return after the // given limit, the function returns regardless of the callback being done or // not. This guarantees the call to finish before or at the given limit.
{ "resource": "" }
c12028
train
// GetUid returns the user id for a given user name
{ "resource": "" }
c12029
train
// GetGid returns the group id for a given group name
{ "resource": "" }
c12030
train
// NewFuse creates a new Fuse and returns it. // A new fuse is always active.
{ "resource": "" }
c12031
train
// Wait blocks until the fuse enters active state. // Multiple go routines may wait on the same fuse.
{ "resource": "" }
c12032
train
// Max3I returns the maximum out of three integers
{ "resource": "" }
c12033
train
// Max3Int64 returns the maximum out of three signed 64-bit integers
{ "resource": "" }
c12034
train
// Max3Uint64 returns the maximum out of three unsigned 64-bit integers
{ "resource": "" }
c12035
train
// Min3I returns the minimum out of three integers
{ "resource": "" }
c12036
train
// Min3Int64 returns the minimum out of three signed 64-bit integers
{ "resource": "" }
c12037
train
// Min3Uint64 returns the minimum out of three unsigned 64-bit integers
{ "resource": "" }
c12038
train
// TryConvertToMarshalMap converts collections to MarshalMap if possible. // This is a deep conversion, i.e. each element in the collection will be // traversed. You can pass a formatKey function that will be applied to all // string keys that are detected.
{ "resource": "" }
c12039
train
// Clone creates a copy of the given MarshalMap.
{ "resource": "" }
c12040
train
// Bool returns a value at key that is expected to be a boolean
{ "resource": "" }
c12041
train
// Uint returns a value at key that is expected to be an uint64 or compatible // integer value.
{ "resource": "" }
c12042
train
// Int returns a value at key that is expected to be an int64 or compatible // integer value.
{ "resource": "" }
c12043
train
// Float returns a value at key that is expected to be a float64 or compatible // float value.
{ "resource": "" }
c12044
train
// Duration returns a value at key that is expected to be a string
{ "resource": "" }
c12045
train
// String returns a value at key that is expected to be a string
{ "resource": "" }
c12046
train
// StringSlice is an alias for StringArray
{ "resource": "" }
c12047
train
// Int64Slice is an alias for Int64Array
{ "resource": "" }
c12048
train
// StringSliceMap is an alias for StringArrayMap
{ "resource": "" }
c12049
train
// Delete a value from a given path. // The path must point to a map key. Deleting from arrays is not supported.
{ "resource": "" }
c12050
train
// Set a value for a given path. // The path must point to a map key. Setting array elements is not supported.
{ "resource": "" }
c12051
train
// Clone does a deep copy of the given value. // Please note that field have to be public in order to be copied. // Private fields will be ignored.
{ "resource": "" }
c12052
train
// SwitchVar adds a boolean flag that is meant to be used without value. If it // is given the value is true, otherwise false.
{ "resource": "" }
c12053
train
// BoolVar adds a boolean flag to the parameters list. This is using the golang // flag package internally.
{ "resource": "" }
c12054
train
// IntVar adds an integer flag to the parameters list. This is using the golang // flag package internally.
{ "resource": "" }
c12055
train
// Int64Var adds am int64 flag to the parameters list. This is using the golang // flag package internally.
{ "resource": "" }
c12056
train
// Float64Var adds a float flag to the parameters list. This is using the golang // flag package internally.
{ "resource": "" }
c12057
train
// StringVar adds a string flag to the parameters list. This is using the golang // flag package internally.
{ "resource": "" }
c12058
train
// Switch is a convenience wrapper for SwitchVar
{ "resource": "" }
c12059
train
// Bool is a convenience wrapper for BoolVar
{ "resource": "" }
c12060
train
// Int is a convenience wrapper for IntVar
{ "resource": "" }
c12061
train
// Int64 is a convenience wrapper for Int64Var
{ "resource": "" }
c12062
train
// Float64 is a convenience wrapper for Float64Var
{ "resource": "" }
c12063
train
// String is a convenience wrapper for StringVar
{ "resource": "" }
c12064
train
// PrintFlags prints information about the flags set for this application
{ "resource": "" }
c12065
train
// Reset clears the buffer by resetting its internal state
{ "resource": "" }
c12066
train
// ResetGetIncomplete works like Reset but returns any incomplete contents // left in the buffer. Note that the data in the buffer returned is overwritten // with the next read call.
{ "resource": "" }
c12067
train
// general message extraction part of all parser methods
{ "resource": "" }
c12068
train
// messages are separated by a delimiter string
{ "resource": "" }
c12069
train
// messages are separated binary length encoded
{ "resource": "" }
c12070
train
// messages are separated by regexp
{ "resource": "" }
c12071
train
// ReadAll calls ReadOne as long as there are messages in the stream. // Messages will be send to the given write callback. // If callback is nil, data will be read and discarded.
{ "resource": "" }
c12072
train
// NewLogScope creates a new LogScope with the given prefix string.
{ "resource": "" }
c12073
train
// SetVerbosity defines the type of messages to be processed. // High level verobosities contain lower levels, i.e. log level warning will // contain error messages, too.
{ "resource": "" }
c12074
train
// SetCacheWriter will force all logs to be cached until another writer is set
{ "resource": "" }
c12075
train
// RoundTrip dials the unix domain socket, sends the request and processes the // response.
{ "resource": "" }
c12076
train
// NewMetrics creates a new metrics container. // To initialize the global Metrics variable use EnableGlobalMetrics.
{ "resource": "" }
c12077
train
// Set sets a given metric to a given value.
{ "resource": "" }
c12078
train
// Inc adds 1 to a given metric.
{ "resource": "" }
c12079
train
// Dec subtracts 1 from a given metric.
{ "resource": "" }
c12080
train
// Add adds a number to a given metric.
{ "resource": "" }
c12081
train
// Get returns the value of a given metric or rate. // If the value does not exists error is non-nil and the returned value is 0.
{ "resource": "" }
c12082
train
// Dump creates a JSON string from all stored metrics.
{ "resource": "" }
c12083
train
// ResetMetrics resets all registered key values to 0 expect for system Metrics. // This locks all writes in the process.
{ "resource": "" }
c12084
train
// FetchAndReset resets all of the given keys to 0 and returns the // value before the reset as array. If a given metric does not exist // it is ignored. This locks all writes in the process.
{ "resource": "" }
c12085
train
// UpdateSystemMetrics updates all default or system based metrics like memory // consumption and number of go routines. This function is not called // automatically.
{ "resource": "" }
c12086
train
// NewTrie creates a new root TrieNode
{ "resource": "" }
c12087
train
// ForEach applies a function to each node in the tree including and below the // passed node.
{ "resource": "" }
c12088
train
// Match compares the trie to the given data stream. // Match returns true if data can be completely matched to the trie.
{ "resource": "" }
c12089
train
// Push adds a new error to the top of the error stack. // Returns if err != nil.
{ "resource": "" }
c12090
train
// Pushf adds a new error message to the top of the error stack
{ "resource": "" }
c12091
train
// PushAndDescribe behaves like Push but allows to prepend a text before // the error messages returned by err. The type of err will be lost.
{ "resource": "" }
c12092
train
// Pop removes an error from the top of the stack and returns it
{ "resource": "" }
c12093
train
// Error implements the Error interface
{ "resource": "" }
c12094
train
// ErrorStackFormatNumbered returns errors with a number prefix, separated by // newline.
{ "resource": "" }
c12095
train
// NewMetricServer creates a new server state for a metric server based on // the global Metric variable.
{ "resource": "" }
c12096
train
// NewMetricServerFor creates a new server state for a metric server based // on a custom Metrics variable
{ "resource": "" }
c12097
train
// Stop notifies the metric server to halt.
{ "resource": "" }
c12098
train
// NewQueueWithSpinner allows to set the spinning priority of the queue to // be created.
{ "resource": "" }
c12099
train
// Push adds an item to the queue. This call may block if the queue is full. // An error is returned when the queue is locked.
{ "resource": "" }