_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c20200
train
// Fixed command removes duplicates and conflicts from the hosts file
{ "resource": "" }
c20201
train
// Dump command outputs hosts file contents as JSON
{ "resource": "" }
c20202
train
// Apply command adds hostnames to the hosts file from JSON
{ "resource": "" }
c20203
train
// MustParseLine is like ParseLine but panics instead of errors.
{ "resource": "" }
c20204
train
// Read the contents of the hostfile from disk
{ "resource": "" }
c20205
train
// Less determines the sort order of two Hostnames, part of sort.Interface
{ "resource": "" }
c20206
train
// Swap changes the position of two Hostnames, part of sort.Interface
{ "resource": "" }
c20207
train
// Contains returns true if this Hostlist has the specified Hostname
{ "resource": "" }
c20208
train
// ContainsDomain returns true if a Hostname in this Hostlist matches domain
{ "resource": "" }
c20209
train
// ContainsIP returns true if a Hostname in this Hostlist matches IP
{ "resource": "" }
c20210
train
// IndexOf will indicate the index of a Hostname in Hostlist, or -1 if it is // not found.
{ "resource": "" }
c20211
train
// IndexOfDomainV will indicate the index of a Hostname in Hostlist that has // the same domain and IP version, or -1 if it is not found. // // This function will panic if IP version is not 4 or 6.
{ "resource": "" }
c20212
train
// RemoveDomain removes both IPv4 and IPv6 Hostname entries matching domain. // Returns the number of entries removed.
{ "resource": "" }
c20213
train
// RemoveDomainV removes a Hostname entry matching the domain and IP version.
{ "resource": "" }
c20214
train
// Enable will change any Hostnames matching domain to be enabled.
{ "resource": "" }
c20215
train
// EnableV will change a Hostname matching domain and IP version to be enabled. // // This function will panic if IP version is not 4 or 6.
{ "resource": "" }
c20216
train
// FilterByIP filters the list of hostnames by IP address.
{ "resource": "" }
c20217
train
// FilterByDomain filters the list of hostnames by Domain.
{ "resource": "" }
c20218
train
// FilterByDomainV filters the list of hostnames by domain and IPv4 or IPv6. // This should never contain more than one item, but returns a list for // consistency with other filter functions. // // This function will panic if IP version is not 4 or 6.
{ "resource": "" }
c20219
train
// Apply imports all entries from the JSON input to this Hostlist
{ "resource": "" }
c20220
train
// LogWithBarker emits a log entry using a bark logger.
{ "resource": "" }
c20221
train
// LogWithZapper emits a log entry using a zap logger.
{ "resource": "" }
c20222
train
// NewNopLogger creates a no-op logger.
{ "resource": "" }
c20223
train
// Barkify wraps a zap logger in a compatibility layer so that it satisfies // the bark.Logger interface. Note that the wrapper always returns nil from // the Fields method, since zap doesn't support this functionality.
{ "resource": "" }
c20224
train
// IsSet says whether any options were set.
{ "resource": "" }
c20225
train
// CreateArchive takes the given path and ArchiveOpts and archives it. // // The archive will be fully completed and put into a temporary file. // This must be done to retrieve the content length of the archive which // is needed for almost all operations involving archives with Atlas. Because // of this, sufficient di...
{ "resource": "" }
c20226
train
// CreateApp creates a new App under the given user with the given name. If the // App is created successfully, it is returned. If the server returns any // errors, an error is returned.
{ "resource": "" }
c20227
train
// UploadApp creates and uploads a new version for the App. If the server does not // find the application, an error is returned. If the server does not accept the // data, an error is returned. // // It is the responsibility of the caller to create a properly-formed data // object; this method blindly passes along the...
{ "resource": "" }
c20228
train
// DefaultClient returns a client that connects to the Atlas API.
{ "resource": "" }
c20229
train
// Request creates a new HTTP request using the given verb and sub path.
{ "resource": "" }
c20230
train
// rawRequest accepts a verb, URL, and RequestOptions struct and returns the // constructed http.Request and any errors that occurred
{ "resource": "" }
c20231
train
// parseErr is used to take an error JSON response and return a single string // for use in error messages.
{ "resource": "" }
c20232
train
// BuildConfig gets a single build configuration by user and name.
{ "resource": "" }
c20233
train
// CreateBuildConfig creates a new build configuration.
{ "resource": "" }
c20234
train
// MarshalJSON converts the UploadArtifactOpts into a JSON struct.
{ "resource": "" }
c20235
train
// Artifact finds the Atlas artifact by the given name and returns it. Any // errors that occur are returned, including ErrAuth and ErrNotFound special // exceptions which the user may want to handle separately.
{ "resource": "" }
c20236
train
// ArtifactSearch searches Atlas for the given ArtifactSearchOpts and returns // a slice of ArtifactVersions.
{ "resource": "" }
c20237
train
// CreateArtifact creates and returns a new Artifact in Atlas. Any errors that // occurr are returned.
{ "resource": "" }
c20238
train
// ArtifactFileURL is a helper method for getting the URL for an ArtifactVersion // from the Client.
{ "resource": "" }
c20239
train
// UploadArtifact streams the upload of a file on disk using the given // UploadArtifactOpts. Any errors that occur are returned.
{ "resource": "" }
c20240
train
// CreateTerraformConfigVersion creatse a new Terraform configuration // versions and uploads a slug with it.
{ "resource": "" }
c20241
train
// Login accepts a username and password as string arguments. Both username and // password must be non-nil, non-empty values. Atlas does not permit // passwordless authentication. // // If authentication is unsuccessful, an error is returned with the body of the // error containing the server's response. // // If auth...
{ "resource": "" }
c20242
train
// Verify verifies that authentication and communication with Atlas // is properly functioning.
{ "resource": "" }
c20243
train
// vcsDetect detects the VCS that is used for path.
{ "resource": "" }
c20244
train
// vcsPreflight returns the metadata for the VCS directory path.
{ "resource": "" }
c20245
train
// vcsFiles returns the files for the VCS directory path.
{ "resource": "" }
c20246
train
// vcsFilesCmd creates a Files-compatible function that reads the files // by executing the command in the repository path and returning each // line in stdout.
{ "resource": "" }
c20247
train
// vcsTrimCmd trims the prefix from the paths returned by another VCSFilesFunc. // This should be used to wrap another function if the return value is known // to have full paths rather than relative paths
{ "resource": "" }
c20248
train
// vcsMetadata returns the metadata for the VCS directory path.
{ "resource": "" }
c20249
train
// gitBranch gets and returns the current git branch for the Git repository // at the given path. It is assumed that the VCS is git.
{ "resource": "" }
c20250
train
// gitCommit gets the SHA of the latest commit for the Git repository at the // given path. It is assumed that the VCS is git.
{ "resource": "" }
c20251
train
// gitRemotes gets and returns a map of all remotes for the Git repository. The // map key is the name of the remote of the format "remote.NAME" and the value // is the endpoint for the remote. It is assumed that the VCS is git.
{ "resource": "" }
c20252
train
// gitPreflight is the pre-flight command that runs for Git-based VCSs
{ "resource": "" }
c20253
train
// gitMetadata is the function to parse and return Git metadata
{ "resource": "" }
c20254
train
//RegisterMocker puts mocker to the list of controller mockers
{ "resource": "" }
c20255
train
//Finish calls to MinimockFinish method for all registered mockers
{ "resource": "" }
c20256
train
//Wait calls to MinimockWait method for all registered mockers
{ "resource": "" }
c20257
train
// CamelToSnake transforms strings from CamelCase to snake_case
{ "resource": "" }
c20258
train
// checkDuplicateOutputFiles finds first non-unique Go file
{ "resource": "" }
c20259
train
// Equal returns true if a equals b
{ "resource": "" }
c20260
train
// Diff returns unified diff of the textual representations of e and a
{ "resource": "" }
c20261
train
// New returns a new router
{ "resource": "" }
c20262
train
// Function checks if MessageAttributes passed to Topic satisfy FilterPolicy set by subscription
{ "resource": "" }
c20263
train
// this is just a function that will return true // the last 5 out of every 15 times called
{ "resource": "" }
c20264
train
// Satisfy the go-health.ICheckable interface
{ "resource": "" }
c20265
train
// Status is used for performing a diskusage check against a dependency; it satisfies // the "ICheckable" interface.
{ "resource": "" }
c20266
train
// New returns a new instance of the Health struct.
{ "resource": "" }
c20267
train
// AddCheck is used for adding a single check definition to the current health // instance.
{ "resource": "" }
c20268
train
// Stop will cause all of the running health checks to be stopped. Additionally, // all existing check states will be reset.
{ "resource": "" }
c20269
train
// Failed will return the basic state of overall health. This should be used when // details about the failure are not needed
{ "resource": "" }
c20270
train
// resets the states in a concurrency-safe manner
{ "resource": "" }
c20271
train
// updates the check state in a concurrency-safe manner
{ "resource": "" }
c20272
train
// get all states in a concurrency-safe manner
{ "resource": "" }
c20273
train
// if a status listener is attached
{ "resource": "" }
c20274
train
// Status is used for performing a redis check against a dependency; it satisfies // the "ICheckable" interface.
{ "resource": "" }
c20275
train
// NewReachableChecker creates a new reachable health checker
{ "resource": "" }
c20276
train
// Status checks if the endpoint is reachable
{ "resource": "" }
c20277
train
// Status is used for performing an HTTP check against a dependency; it satisfies // the "ICheckable" interface.
{ "resource": "" }
c20278
train
// DefaultQueryHandler is the default SQLQueryer result handler // that assumes one row was returned from the passed query
{ "resource": "" }
c20279
train
// DefaultExecHandler is the default SQLExecer result handler // that assumes one row was affected in the passed query
{ "resource": "" }
c20280
train
// this makes sure the sql check is properly configured
{ "resource": "" }
c20281
train
// Status is used for performing a database ping against a dependency; it satisfies // the "ICheckable" interface.
{ "resource": "" }
c20282
train
// This will run the execer from the Status func
{ "resource": "" }
c20283
train
// This will run the queryer from the Status func
{ "resource": "" }
c20284
train
// HealthCheckRecovered is triggered when a health check recovers
{ "resource": "" }
c20285
train
// NewEncoder creates a new encoder instance with sane defaults
{ "resource": "" }
c20286
train
// Encode encodes the given values and sets the corresponding struct values
{ "resource": "" }
c20287
train
// NewDecoder creates a new decoder instance with sane defaults
{ "resource": "" }
c20288
train
// ExtractType gets the actual underlying type of field value. // it is exposed for use within you Custom Functions
{ "resource": "" }
c20289
train
// hasValue determines if a reflect.Value is it's default value
{ "resource": "" }
c20290
train
// New creates and initialize a new Compiler.
{ "resource": "" }
c20291
train
// MustCompile is the same as Compile, except the input is assumed error free. If else, panic.
{ "resource": "" }
c20292
train
// MustCompileFile is the same as CompileFile, except the input is assumed error free. If else, panic.
{ "resource": "" }
c20293
train
// MustCompileDir is the same as CompileDir, except input is assumed error free. If else, panic.
{ "resource": "" }
c20294
train
// Parse given raw amber template bytes, and the filename that belongs with it
{ "resource": "" }
c20295
train
// ParseFile parses the amber template file in given path.
{ "resource": "" }
c20296
train
// CompileWithName is the same as Compile, but allows to specify a name for the template.
{ "resource": "" }
c20297
train
// CompileWithTemplate is the same as Compile but allows to specify a template.
{ "resource": "" }
c20298
train
// Returns next token found in buffer
{ "resource": "" }
c20299
train
// Reads string into s.buffer
{ "resource": "" }