_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c180000
test
// Dief executes the same function on the default Base instance
{ "resource": "" }
c180001
test
// Diem executes the same function on the default Base instance
{ "resource": "" }
c180002
test
// ToLogLevel will take a string and return the appropriate log level for // the string if known. If the string is not recognized it will return // an ErrUnknownLevel error.
{ "resource": "" }
c180003
test
// CallErr queues function f on the main thread and returns an error returned by f.
{ "resource": "" }
c180004
test
// New creates a StackdriverHook using the provided options that is suitible // for using with logrus for logging to Google Stackdriver.
{ "resource": "" }
c180005
test
// Fire writes the message to the Stackdriver entry service.
{ "resource": "" }
c180006
test
// Levels is an option that sets the logrus levels that the StackdriverHook // will create log entries for.
{ "resource": "" }
c180007
test
// ProjectID is an option that sets the project ID which is needed for the log // name.
{ "resource": "" }
c180008
test
// EntriesService is an option that sets the Google API entry service to use // with Stackdriver.
{ "resource": "" }
c180009
test
// LoggingService is an option that sets the Google API logging service to use.
{ "resource": "" }
c180010
test
// ErrorService is an option that sets the Google API error reporting service to use.
{ "resource": "" }
c180011
test
// HTTPClient is an option that sets the http.Client to be used when creating // the Stackdriver service.
{ "resource": "" }
c180012
test
// MonitoredResource is an option that sets the monitored resource to send with // each log entry.
{ "resource": "" }
c180013
test
// ErrorReportingLogName is an option that sets the log name to send // with each error message for error reporting. // Only used when ErrorReportingService has been set.
{ "resource": "" }
c180014
test
// Labels is an option that sets the labels to send with each log entry.
{ "resource": "" }
c180015
test
// PartialSuccess is an option that toggles whether or not to write partial log // entries.
{ "resource": "" }
c180016
test
// GoogleComputeCredentials is an option that loads the Google Service Account // credentials from the GCE metadata associated with the GCE compute instance. // If serviceAccount is empty, then the default service account credentials // associated with the GCE instance will be used.
{ "resource": "" }
c180017
test
// NewEncoder returns a new encoder that outputs to w.
{ "resource": "" }
c180018
test
// NewDecoder returns a new decoder that takes input from r.
{ "resource": "" }
c180019
test
// NewStreamEncoder returns a new stream encoder that outputs to w.
{ "resource": "" }
c180020
test
// NewStreamDecoder returns a new stream decoder that takes input from r.
{ "resource": "" }
c180021
test
// Register adds a codec for a mimetype to r.
{ "resource": "" }
c180022
test
// Unregister removes the codec for a mimetype from r.
{ "resource": "" }
c180023
test
// Lookup returns the codec associated with mimetype, ok is set to true or false // based on whether a codec was found.
{ "resource": "" }
c180024
test
// Codecs returns a map of all codecs registered in reg.
{ "resource": "" }
c180025
test
// Type returns the RESP error type, which is represented by the leading // uppercase word in the error string.
{ "resource": "" }
c180026
test
// Install adds an adapter for typ. // // The function panics if one of the encoder and decoder functions of the // adapter are nil. // // A typical use case for this function is to be called during the package // initialization phase to extend objconv support for new types.
{ "resource": "" }
c180027
test
// AdapterOf returns the adapter for typ, setting ok to true if one was found, // false otherwise.
{ "resource": "" }
c180028
test
// AppendDuration appends a human-readable representation of d to b. // // The function copies the implementation of time.Duration.String but prevents // Go from making a dynamic memory allocation on the returned value.
{ "resource": "" }
c180029
test
// fmtInt formats v into the tail of buf. // It returns the index where the output begins.
{ "resource": "" }
c180030
test
// NewDecoder returns a new JSON decoder that parses values from r.
{ "resource": "" }
c180031
test
// NewStreamDecoder returns a new JSON stream decoder that parses values from r.
{ "resource": "" }
c180032
test
// Unmarshal decodes a JSON representation of v from b.
{ "resource": "" }
c180033
test
// String returns a human readable representation of the type.
{ "resource": "" }
c180034
test
// zeroValueOf and the related cache is used to keep the zero values so they // don't need to be reallocated every time they're used.
{ "resource": "" }
c180035
test
// NewValueParser creates a new parser that exposes the value v.
{ "resource": "" }
c180036
test
// ParseTag parses a raw tag obtained from a struct field, returning the results // as a tag value.
{ "resource": "" }
c180037
test
// NewEncoder returns a new JSON encoder that writes to w.
{ "resource": "" }
c180038
test
// NewStreamEncoder returns a new JSON stream encoder that writes to w.
{ "resource": "" }
c180039
test
// NewPrettyEncoder returns a new JSON encoder that writes to w.
{ "resource": "" }
c180040
test
// NewPrettyStreamEncoder returns a new JSON stream encoder that writes to w.
{ "resource": "" }
c180041
test
// Marshal writes the JSON representation of v to a byte slice returned in b.
{ "resource": "" }
c180042
test
// NewEncoder returns a new encoder that outputs values to e. // // Encoders created by this function use the default encoder configuration, // which is equivalent to using a zero-value EncoderConfig with only the Emitter // field set. // // The function panics if e is nil.
{ "resource": "" }
c180043
test
// EncodeArray provides the implementation of the array encoding algorithm, // where n is the number of elements in the array, and f a function called to // encode each element. // // The n argument can be set to a negative value to indicate that the program // doesn't know how many elements it will output to the array. Be mindful that // not all emitters support encoding arrays of unknown lengths. // // The f function is called to encode each element of the array.
{ "resource": "" }
c180044
test
// EncodeMap provides the implementation of the map encoding algorithm, where n // is the number of elements in the map, and f a function called to encode each // element. // // The n argument can be set to a negative value to indicate that the program // doesn't know how many elements it will output to the map. Be mindful that not // all emitters support encoding maps of unknown length. // // The f function is called to encode each element of the map, it is expected to // encode two values, the first one being the key, follow by the associated value. // The first encoder must be used to encode the key, the second for the value.
{ "resource": "" }
c180045
test
// NewStreamEncoder returns a new stream encoder that outputs to e. // // The function panics if e is nil.
{ "resource": "" }
c180046
test
// Open explicitly tells the encoder to start the stream, setting the number // of values to n. // // Depending on the actual format that the stream is encoding to, n may or // may not have to be accurate, some formats also support passing a negative // value to indicate that the number of elements is unknown.
{ "resource": "" }
c180047
test
// Close terminates the stream encoder.
{ "resource": "" }
c180048
test
// Encode writes v to the stream, encoding it based on the emitter configured // on e.
{ "resource": "" }
c180049
test
// newStructType takes a Go type as argument and extract information to make a // new structType value. // The type has to be a struct type or a panic will be raised.
{ "resource": "" }
c180050
test
// lookup takes a Go type as argument and returns the matching structType value, // potentially creating it if it didn't already exist. // This method is safe to call from multiple goroutines.
{ "resource": "" }
c180051
test
// clear empties the cache.
{ "resource": "" }
c180052
test
// CheckUint64Bounds verifies that v is smaller than max, t represents the // original type of v.
{ "resource": "" }
c180053
test
// CheckInt64Bounds verifies that v is within min and max, t represents the // original type of v.
{ "resource": "" }
c180054
test
// NewDecoder returns a decoder object that uses p, will panic if p is nil.
{ "resource": "" }
c180055
test
// Decode expects v to be a pointer to a value in which the decoder will load // the next parsed data. // // The method panics if v is neither a pointer type nor implements the // ValueDecoder interface, or if v is a nil pointer.
{ "resource": "" }
c180056
test
// DecodeArray provides the implementation of the algorithm for decoding arrays, // where f is called to decode each element of the array.
{ "resource": "" }
c180057
test
// DecodeMap provides the implementation of the algorithm for decoding maps, // where f is called to decode each pair of key and value. // // The function f is expected to decode two values from the map, the first one // being the key and the second the associated value. The first decoder must be // used to decode the key, the second one for the value.
{ "resource": "" }
c180058
test
// NewStreamDecoder returns a new stream decoder that takes input from p. // // The function panics if p is nil.
{ "resource": "" }
c180059
test
// Len returns the number of values remaining to be read from the stream, which // may be -1 if the underlying format doesn't provide this information. If an // error occurred while decoding the stream the method returns zero because no // more values can be read.
{ "resource": "" }
c180060
test
// Err returns the last error returned by the Decode method. // // The method returns nil if the stream reached its natural end.
{ "resource": "" }
c180061
test
// Decodes the next value from the stream into v.
{ "resource": "" }
c180062
test
// Encoder returns a new StreamEncoder which can be used to re-encode the stream // decoded by d into e. // // The method panics if e is nil.
{ "resource": "" }
c180063
test
// Read logger flags from the LOGFLAGS environment variable. Multiple flags can // be set at once, separated by commas.
{ "resource": "" }
c180064
test
// LevelFromString returns a level based on the input string s. If the input // can't be interpreted as a valid log level, the info level and false is // returned.
{ "resource": "" }
c180065
test
// NewBackend creates a logger backend from a Writer.
{ "resource": "" }
c180066
test
// callsite returns the file name and line number of the callsite to the // subsystem logger.
{ "resource": "" }
c180067
test
// print outputs a log message to the writer associated with the backend after // creating a prefix for the given level and tag according to the formatHeader // function and formatting the provided arguments using the default formatting // rules.
{ "resource": "" }
c180068
test
// Logger returns a new logger for a particular subsystem that writes to the // Backend b. A tag describes the subsystem and is included in all log // messages. The logger uses the info verbosity level by default.
{ "resource": "" }
c180069
test
// Trace formats message using the default formats for its operands, prepends // the prefix as necessary, and writes to log with LevelTrace. // // This is part of the Logger interface implementation.
{ "resource": "" }
c180070
test
// Tracef formats message according to format specifier, prepends the prefix as // necessary, and writes to log with LevelTrace. // // This is part of the Logger interface implementation.
{ "resource": "" }
c180071
test
// Debug formats message using the default formats for its operands, prepends // the prefix as necessary, and writes to log with LevelDebug. // // This is part of the Logger interface implementation.
{ "resource": "" }
c180072
test
// Debugf formats message according to format specifier, prepends the prefix as // necessary, and writes to log with LevelDebug. // // This is part of the Logger interface implementation.
{ "resource": "" }
c180073
test
// Info formats message using the default formats for its operands, prepends // the prefix as necessary, and writes to log with LevelInfo. // // This is part of the Logger interface implementation.
{ "resource": "" }
c180074
test
// Infof formats message according to format specifier, prepends the prefix as // necessary, and writes to log with LevelInfo. // // This is part of the Logger interface implementation.
{ "resource": "" }
c180075
test
// Warn formats message using the default formats for its operands, prepends // the prefix as necessary, and writes to log with LevelWarn. // // This is part of the Logger interface implementation.
{ "resource": "" }
c180076
test
// Warnf formats message according to format specifier, prepends the prefix as // necessary, and writes to log with LevelWarn. // // This is part of the Logger interface implementation.
{ "resource": "" }
c180077
test
// Error formats message using the default formats for its operands, prepends // the prefix as necessary, and writes to log with LevelError. // // This is part of the Logger interface implementation.
{ "resource": "" }
c180078
test
// Errorf formats message according to format specifier, prepends the prefix as // necessary, and writes to log with LevelError. // // This is part of the Logger interface implementation.
{ "resource": "" }
c180079
test
// Critical formats message using the default formats for its operands, prepends // the prefix as necessary, and writes to log with LevelCritical. // // This is part of the Logger interface implementation.
{ "resource": "" }
c180080
test
// Criticalf formats message according to format specifier, prepends the prefix // as necessary, and writes to log with LevelCritical. // // This is part of the Logger interface implementation.
{ "resource": "" }
c180081
test
// Level returns the current logging level // // This is part of the Logger interface implementation.
{ "resource": "" }
c180082
test
// SetLevel changes the logging level to the passed level. // // This is part of the Logger interface implementation.
{ "resource": "" }
c180083
test
// Concat concat two permissions into a new one
{ "resource": "" }
c180084
test
// HasPermission check roles has permission for mode or not
{ "resource": "" }
c180085
test
// ConcatPermissioner concat permissioner
{ "resource": "" }
c180086
test
// HasPermission check has permission for permissioners or not
{ "resource": "" }
c180087
test
// Register register role with conditions
{ "resource": "" }
c180088
test
// NewPermission initialize permission
{ "resource": "" }
c180089
test
// Get role defination
{ "resource": "" }
c180090
test
// isPtrFromHeap reports whether the inferior at address a contains a pointer. // a must be somewhere in the heap.
{ "resource": "" }
c180091
test
// IsPtr reports whether the inferior at address a contains a pointer.
{ "resource": "" }
c180092
test
// FindObject finds the object containing a. Returns that object and the offset within // that object to which a points. // Returns 0,0 if a doesn't point to a live heap object.
{ "resource": "" }
c180093
test
// ForEachObject calls fn with each object in the Go heap. // If fn returns false, ForEachObject returns immediately.
{ "resource": "" }
c180094
test
// ForEachRoot calls fn with each garbage collection root. // If fn returns false, ForEachRoot returns immediately.
{ "resource": "" }
c180095
test
// Addr returns the starting address of x.
{ "resource": "" }
c180096
test
// Size returns the size of x in bytes.
{ "resource": "" }
c180097
test
// Type returns the type and repeat count for the object x. // x contains at least repeat copies of the returned type.
{ "resource": "" }
c180098
test
// ForEachRootPtr behaves like ForEachPtr but it starts with a Root instead of an Object.
{ "resource": "" }
c180099
test
// edges1 calls fn for the edges found in an object of type t living at offset off in the root r. // If fn returns false, return immediately with false.
{ "resource": "" }