_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c11900
train
// NewSentryHook creates a hook to be added to an instance of logger // and initializes the raven client. // This method sets the timeout to 100 milliseconds.
{ "resource": "" }
c11901
train
// NewWithTagsSentryHook creates a hook with tags to be added to an instance // of logger and initializes the raven client. This method sets the timeout to // 100 milliseconds.
{ "resource": "" }
c11902
train
// NewWithClientSentryHook creates a hook using an initialized raven client. // This method sets the timeout to 100 milliseconds.
{ "resource": "" }
c11903
train
// NewAsyncSentryHook creates a hook same as NewSentryHook, but in asynchronous // mode.
{ "resource": "" }
c11904
train
// NewAsyncWithTagsSentryHook creates a hook same as NewWithTagsSentryHook, but // in asynchronous mode.
{ "resource": "" }
c11905
train
// NewAsyncWithClientSentryHook creates a hook same as NewWithClientSentryHook, // but in asynchronous mode.
{ "resource": "" }
c11906
train
// Flush waits for the log queue to empty. This function only does anything in // asynchronous mode.
{ "resource": "" }
c11907
train
// AddExtraFilter adds a custom filter function.
{ "resource": "" }
c11908
train
// AddErrorHandler adds a error handler function used when Sentry returns error.
{ "resource": "" }
c11909
train
// formatData returns value as a suitable format.
{ "resource": "" }
c11910
train
// GetSymbolPointer takes a symbol name and returns a pointer to the symbol.
{ "resource": "" }
c11911
train
// Close closes a LibHandle.
{ "resource": "" }
c11912
train
// DeleteCookies effectively deletes all named cookies // by wiping all data and setting to expire immediately.
{ "resource": "" }
c11913
train
// NewLogFormatter is a helper to produce a new LogFormatter struct. It uses the // golang log package to actually do the logging work so that logs look similar.
{ "resource": "" }
c11914
train
// Format builds a log message for the LogFormatter. The LogLevel is ignored.
{ "resource": "" }
c11915
train
// Format does nothing.
{ "resource": "" }
c11916
train
// Char returns a single-character representation of the log level.
{ "resource": "" }
c11917
train
// Update using the given string value. Fulfills the flag.Value interface.
{ "resource": "" }
c11918
train
// ParseLevel translates some potential loglevel strings into their corresponding levels.
{ "resource": "" }
c11919
train
// SetGlobalLogLevel sets the log level for all packages in all repositories // registered with capnslog.
{ "resource": "" }
c11920
train
// GetRepoLogger may return the handle to the repository's set of packages' loggers.
{ "resource": "" }
c11921
train
// MustRepoLogger returns the handle to the repository's packages' loggers.
{ "resource": "" }
c11922
train
// SetRepoLogLevel sets the log level for all packages in the repository.
{ "resource": "" }
c11923
train
// ParseLogLevelConfig parses a comma-separated string of "package=loglevel", in // order, and returns a map of the results, for use in SetLogLevel.
{ "resource": "" }
c11924
train
// SetFormatter sets the formatting function for all logs.
{ "resource": "" }
c11925
train
// NewPackageLogger creates a package logger object. // This should be defined as a global var in your package, referencing your repo.
{ "resource": "" }
c11926
train
// NewCopyProgressPrinter returns a new CopyProgressPrinter
{ "resource": "" }
c11927
train
// AddCopy adds a copy for this CopyProgressPrinter to perform. An io.Copy call // will be made to copy bytes from reader to dest, and name and size will be // used to label the progress bar and display how much progress has been made. // If size is 0, the total size of the reader is assumed to be unknown. // AddCopy c...
{ "resource": "" }
c11928
train
// PrintAndWait will print the progress for each copy operation added with // AddCopy to printTo every printInterval. This will continue until every added // copy is finished, or until cancel is written to. // PrintAndWait may only be called once; any subsequent calls will immediately // return ErrAlreadyStarted. Afte...
{ "resource": "" }
c11929
train
// ByteUnitStr pretty prints a number of bytes.
{ "resource": "" }
c11930
train
// MergeQuery appends additional query values to an existing URL.
{ "resource": "" }
c11931
train
// SetFlagsFromEnvFile iterates the given flagset and if any flags are not // already set it attempts to set their values from the given env file. Env // files may have KEY=VALUE lines where the environment variable names are // in UPPERCASE, prefixed by the given PREFIX, and dashes are replaced by // underscores. For ...
{ "resource": "" }
c11932
train
// SetLevel allows users to change the current logging level.
{ "resource": "" }
c11933
train
// LevelAt checks if the given log level will be outputted under current setting.
{ "resource": "" }
c11934
train
// Log a formatted string at any level between ERROR and TRACE
{ "resource": "" }
c11935
train
// Log a message at any level between ERROR and TRACE
{ "resource": "" }
c11936
train
// log stdlib compatibility
{ "resource": "" }
c11937
train
// Panic and fatal
{ "resource": "" }
c11938
train
// SetCurrentProgress sets the progress of this ProgressBar. The progress must // be between 0 and 1 inclusive.
{ "resource": "" }
c11939
train
// GetDone returns whether or not this progress bar is done
{ "resource": "" }
c11940
train
// GetPrintBefore gets the text printed on the line before the progress bar.
{ "resource": "" }
c11941
train
// SetPrintBefore sets the text printed on the line before the progress bar.
{ "resource": "" }
c11942
train
// GetPrintAfter gets the text printed on the line after the progress bar.
{ "resource": "" }
c11943
train
// SetPrintAfter sets the text printed on the line after the progress bar.
{ "resource": "" }
c11944
train
// AddProgressBar will create a new ProgressBar, register it with this // ProgressBarPrinter, and return it. This must be called at least once before // PrintAndWait is called.
{ "resource": "" }
c11945
train
// Print will print out progress information for each ProgressBar that has been // added to this ProgressBarPrinter. The progress will be written to printTo, // and if printTo is a terminal it will draw progress bars. AddProgressBar // must be called at least once before Print is called. If printing to a // terminal, ...
{ "resource": "" }
c11946
train
// moveCursorUp moves the cursor up numLines in the terminal
{ "resource": "" }
c11947
train
// isTerminal returns True when w is going to a tty, and false otherwise.
{ "resource": "" }
c11948
train
// NewStandardEtcdConfigManager returns a new ConfigManager backed by etcd.
{ "resource": "" }
c11949
train
// NewStandardConsulConfigManager returns a new ConfigManager backed by consul.
{ "resource": "" }
c11950
train
// NewEtcdConfigManager returns a new ConfigManager backed by etcd. // Data will be encrypted.
{ "resource": "" }
c11951
train
// NewConsulConfigManager returns a new ConfigManager backed by consul. // Data will be encrypted.
{ "resource": "" }
c11952
train
// Get retrieves and decodes a secconf value stored at key.
{ "resource": "" }
c11953
train
// Get retrieves a value stored at key. // convenience function, no additional value provided over // `etcdctl`
{ "resource": "" }
c11954
train
// List retrieves and decodes all secconf value stored under key.
{ "resource": "" }
c11955
train
// List retrieves all values under key. // convenience function, no additional value provided over // `etcdctl`
{ "resource": "" }
c11956
train
// Deocde decodes data using the secconf codec.
{ "resource": "" }
c11957
train
// Encode encodes data to a base64 encoded using the secconf codec. // data is encrypted with all public keys found in the supplied keyring.
{ "resource": "" }
c11958
train
// ConvertFieldNames takes in any interface that inplements SObject and a comma separated list of json field names. // It converts the json field names to the force struct tag stated equivalent.
{ "resource": "" }
c11959
train
// Helper function used in ConvertFieldNames
{ "resource": "" }
c11960
train
// Use the Query resource to execute a SOQL query that returns all the results in a single response, // or if needed, returns part of the results and an identifier used to retrieve the remaining results.
{ "resource": "" }
c11961
train
// Use the QueryAll resource to execute a SOQL query that includes information about records that have // been deleted because of a merge or delete. Use QueryAll rather than Query, because the Query resource // will automatically filter out items that have been deleted.
{ "resource": "" }
c11962
train
// nextValue splits data after the next whole JSON value, // returning that value and the bytes that follow it as separate slices. // scan is passed in for use by nextValue to avoid an allocation.
{ "resource": "" }
c11963
train
// Delete issues a DELETE to the specified path with the given payload
{ "resource": "" }
c11964
train
// saveError saves the first err it is called with, // for reporting at the end of the unmarshal.
{ "resource": "" }
c11965
train
// String lets us see file information
{ "resource": "" }
c11966
train
// PathEscape escapes all segemnts of a given path
{ "resource": "" }
c11967
train
// Join joins two paths
{ "resource": "" }
c11968
train
// String pulls a string out of our io.Reader
{ "resource": "" }
c11969
train
// NewClient creates a new instance of client
{ "resource": "" }
c11970
train
// SetTransport exposes the ability to define custom transports
{ "resource": "" }
c11971
train
// Connect connects to our dav server
{ "resource": "" }
c11972
train
// ReadDir reads the contents of a remote directory
{ "resource": "" }
c11973
train
// Stat returns the file stats for a specified path
{ "resource": "" }
c11974
train
// RemoveAll removes remote files
{ "resource": "" }
c11975
train
// Mkdir makes a directory
{ "resource": "" }
c11976
train
// MkdirAll like mkdir -p, but for webdav
{ "resource": "" }
c11977
train
// Rename moves a file from A to B
{ "resource": "" }
c11978
train
// Read reads the contents of a remote file
{ "resource": "" }
c11979
train
// ReadStream reads the stream for a given path
{ "resource": "" }
c11980
train
// Write writes data to a given path
{ "resource": "" }
c11981
train
// WriteStream writes a stream
{ "resource": "" }
c11982
train
// Fanout receives from the given in channel and forwards the data to the first // non-blocking out channel. Fanout returns when in has been closed.
{ "resource": "" }
c11983
train
// Funnel receives from the first non-blocking in channel and forwards it to the // given out channel. Funnel returns when all in channels have been closed.
{ "resource": "" }
c11984
train
// Turnout multiplexes data between the list of in and out channels. The data of // the first non-blocking in channel will be forwarded to the first non-blocking // out channel. Turnout returns when all in channels have been closed.
{ "resource": "" }
c11985
train
// WritePidFile writes this a process id into a file. // An error will be returned if the file already exists.
{ "resource": "" }
c11986
train
// WritePidFileForced writes this a process id into a file. // An existing file will be overwritten.
{ "resource": "" }
c11987
train
// GetPidFromFile tries loads the content of a pid file. // A pidfile is expected to contain only an integer with a valid process id.
{ "resource": "" }
c11988
train
// GetProcFromFile utilizes GetPidFromFile to create a os.Process handle for // the pid contained in the given pid file.
{ "resource": "" }
c11989
train
// Swap exchanges the values stored at indexes a and b
{ "resource": "" }
c11990
train
// IsDirectory returns true if a given path points to a directory.
{ "resource": "" }
c11991
train
// CommonPath returns the longest common path of both paths given.
{ "resource": "" }
c11992
train
// FileCRC32 returns the checksum of a given file
{ "resource": "" }
c11993
train
// NewStopListener creates a new, stoppable TCP server connection. // Address needs to be cmpliant to net.Listen.
{ "resource": "" }
c11994
train
// Accept is analogous to net.TCPListener.Accept but may return a connection // closed error if the connection was requested to shut down.
{ "resource": "" }
c11995
train
// Close requests a connection close on this listener
{ "resource": "" }
c11996
train
// ChownByName is a wrapper around ChownId that allows changing user and group by name.
{ "resource": "" }
c11997
train
// ChownId is a wrapper around os.Chown that allows changing user and group // recursively if given a directory.
{ "resource": "" }
c11998
train
// Chmod is a wrapper around os.Chmod that allows changing rights recursively // if a directory is given.
{ "resource": "" }
c11999
train
// IsSymlink returns true if a file is a symlink
{ "resource": "" }