_id
stringlengths
2
7
text
stringlengths
6
2.61k
title
stringclasses
1 value
c181000
// Parse parses the environment flags from os.Environ. Must be called // after all flags are defined and before flags are accessed by the // program.
c181001
// WriteStringToFile writes the string to the file at the provided path.
c181002
// ReadFileToString reads the file at the provided path to a string.
c181003
// LineReader returns a channel that reads the contents of a reader // line-by-line.
c181004
// LineReaderFrom returns a channel that reads the contents of a file // line-by-line.
c181005
// FileExists returns a flag indicating whether a provided file path exists.
c181006
// FileExistsInPath returns a flag indicating whether the provided file exists // in the current path.
c181007
// GetPathParts returns the absolute directory path, the file name, and the // absolute path of the provided path string.
c181008
// GetThisPathParts returns the same information as GetPathParts for the // current executable.
c181009
// RandomString generates a random set of characters with the given lenght.
c181010
// ParseAddress parses a standard golang network address and returns the // protocol and path.
c181011
// HomeDir returns the home directory of the user that owns the current process.
c181012
// IsTCPPortAvailable returns a flag indicating whether or not a TCP port is // available.
c181013
// RandomTCPPort gets a free, random TCP port between 1025-65535. If no free // ports are available -1 is returned.
c181014
// HashString works like hash but accept string as an input.
c181015
// Context gets implements RPCServer interface.
c181016
// NewDaemon allocates new daemon instance using given options.
c181017
// Close implements io.Closer interface.
c181018
// NewAccessTokenContext returns a new Context that carries token value.
c181019
// AccessTokenFromContext returns the token value stored in context, if any.
c181020
// RandomAccessToken generate Access Token with given key and generated hash of length 64.
c181021
// Init allocates new logger based on given options.
c181022
// Start implements storage interface.
c181023
// Get implements storage interface.
c181024
// List implements storage interface.
c181025
// Exists implements storage interface.
c181026
// Abandon implements storage interface.
c181027
// SetValue implements storage interface.
c181028
// Delete implements storage interface.
c181029
// Setup implements storage interface.
c181030
// TearDown implements storage interface.
c181031
// initJaeger returns an instance of Jaeger Tracer that samples 100% of traces and logs all spans to stdout.
c181032
// Build constructs a double array from given keywords.
c181033
// Read loads a double array.
c181034
// Get if possible returns node for a given bucket id.
c181035
// ExternalNodes returns all available nodes except host.
c181036
// GetOther returns node for given access token. // Returns false if cluster is nil, has only one element or if node that was found has same listen address as current one.
c181037
// GoString implements fmt GoStringer interface.
c181038
// Scan satisfy sql.Scanner interface.
c181039
// Value satisfy driver.Valuer interface.
c181040
// Has checks if the given key is set.
c181041
// New will create an ActionBar object
c181042
// RegisterAction register global action
c181043
// Actions register actions
c181044
// Render will return the HTML of the bar, used this function to render the bar in frontend page's template or layout
c181045
// FuncMap will return helper to render inline edit button
c181046
// EditMode return whether current mode is `Preview` or `Edit`
c181047
// SwitchMode is handle to store switch status in cookie
c181048
// InlineEdit using to make inline edit resource shown as slideout
c181049
// Error returns a string representation of error e.
c181050
// ParseFile parses the netrc file identified by filename and returns the set of // machine information and macros defined in it. The ``default'' machine, // which is intended to be used when no machine name matches, is identified // by an empty machine name. There can be only one ``default'' machine. // // If there is...
c181051
// FindMachine parses the netrc file identified by filename and returns // the Machine named by name. If no Machine with name name is found, the // ``default'' machine is returned.
c181052
// New returns a pointer to an instance of kace loaded with a common // initialsms trie based on the provided map. Before conversion to a // trie, the provided map keys are all upper cased.
c181053
// Camel returns a camelCased string.
c181054
// Pascal returns a PascalCased string.
c181055
// Snake returns a snake_cased string with all lowercase letters.
c181056
// SnakeUpper returns a SNAKE_CASED string with all upper case letters.
c181057
// Kebab returns a kebab-cased string with all lowercase letters.
c181058
// KebabUpper returns a KEBAB-CASED string with all upper case letters.
c181059
// isPathSafe checks if the passed in path conforms to a whitelist.
c181060
// Start is called on start of a request
c181061
// ParseAuthHeaders parses authentication headers from HTTP request // it currently detects Bearer and Basic auth types
c181062
// Tracer sets a request tracer constructor
c181063
// HTTPClient is a functional parameter that sets the internal // HTTPClient of the roundtrip client wrapper
c181064
// BasicAuth sets username and password for HTTP client
c181065
// BearerAuth sets token for HTTP client
c181066
// CookieJar sets HTTP cookie jar for this client
c181067
// SanitizerEnabled will enable the input sanitizer which passes the URL // path through a strict whitelist.
c181068
// OpenFile opens file using HTTP protocol and uses `Range` headers // to seek to various positions in the file, this means that server // has to support the flags `Range` and `Content-Range`
c181069
// RoundTrip collects response and error assuming fn has done // HTTP roundtrip
c181070
// SetAuthHeader sets client's authorization headers if client // was configured to work with authorization
c181071
// FileName returns HTTP file name
c181072
// newBuffersFromFiles wraps the specified files with a reader // that caches data into a memory buffer
c181073
// newFileBuffer creates a buffer for reading from the specified File file
c181074
// rewind resets this fileBuffer to read from the beginning
c181075
// This is useful with kingpin option parser
c181076
// This is useful with survey prompting library
c181077
// String is required for kingpin to generate usage with this datatype
c181078
// TriggerIncidentKey triggers an incident using the default client with a // given incident key only if that incident has been resolved or if that // incident doesn't exist yet.
c181079
// TriggerWithDetails triggers an incident using the default client with a // description string and a key-value map that will be saved as the incident's // "details".
c181080
// TriggerIncidentKeyWithDetails triggers an incident using the default client // with a given incident key only if that incident has been resolved or if that // incident doesn't exist yet.
c181081
// Merge will attempt to merge the data from src into dst. They shoud be either both maps or both structs. // The structs do not need to have the same structure, but any field name that exists in both // structs will must be the same type.
c181082
// recursively set the Source attribute of the Options
c181083
// dst must be a pointer type
c181084
// Do executes the function in a transaction.
c181085
// NewFile is a convenience function which creates and opens a file
c181086
// RunBenchmarks executes the benchmarks based upon the given criteria // // Returns a resultset
c181087
// String implements String from the Stringer interface and // allows results to be serialized to a sting
c181088
// Tabulate transforms the ResultsSets and returns a slice of Row
c181089
// AmazonRequest is an example to benchmark a call to googles homepage
c181090
// WriteTabularData writes the given results to the given output stream
c181091
// Reduce reduces the ResultSet into buckets defined by the given interval
c181092
// NewSemaphore is used to create a new semaphore, initalised with a capacity // this controls the number of locks which can be active at any one time.
c181093
// Release unlocks the semaphore and allows new lock instances to be called without // blocking if the number of locks currently equal the capacity. // It is important to call Release at the end of any operation which aquires a lock.
c181094
// Resize allows dynamic resizing of the semaphore, it can be used if it desired // to increase the current number of allowable concurent processes.
c181095
// AddOutput adds an output writer to Bench
c181096
// RunBenchmarks runs the benchmarking for the given function
c181097
// We start by dealing with each of the primitive types in turn. // BOOLEAN
c181098
// INTEGER // checkInteger returns nil if the given bytes are a valid DER-encoded // INTEGER and an error otherwise.
c181099
// parseInt64 treats the given bytes as a big-endian, signed integer and // returns the result.