id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
8,500 | all-8501 | [
"StorePluginResults",
"stores",
"a",
"plugin",
"s",
"results",
"in",
"the",
"database",
"by",
"updating",
"the",
"placeholder",
"created",
"by",
"the",
"call",
"to",
"StoreFileInfo"
] | [
"func",
"(",
"db",
"*",
"Database",
")",
"StorePluginResults",
"(",
"results",
"database",
".",
"PluginResults",
")",
"error",
"{",
"// Test connection to ElasticSearch",
"err",
":=",
"db",
".",
"TestConnection",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
... |
8,501 | all-8502 | [
"Finalize",
"ensures",
"there",
"no",
"nil",
"pointers",
"."
] | [
"func",
"(",
"c",
"*",
"VaultConfig",
")",
"Finalize",
"(",
")",
"{",
"if",
"c",
".",
"Address",
"==",
"nil",
"{",
"c",
".",
"Address",
"=",
"stringFromEnv",
"(",
"[",
"]",
"string",
"{",
"api",
".",
"EnvVaultAddress",
",",
"}",
",",
"\"",
"\"",
... |
8,502 | all-8503 | [
"KubeClient",
"returns",
"a",
"Kubernetes",
"client",
"."
] | [
"func",
"(",
"o",
"*",
"KubernetesClientOptions",
")",
"KubeClient",
"(",
")",
"(",
"kubernetes",
".",
"Interface",
",",
"error",
")",
"{",
"<mask>",
"kube",
".",
"GetKubernetesClient",
"(",
"o",
".",
"masterURL",
",",
"o",
".",
"kubeConfig",
")",
"\n",
... |
8,503 | all-8504 | [
"Set",
"sets",
"the",
"config",
".",
"Useful",
"for",
"testing",
"."
] | [
"func",
"(",
"ca",
"*",
"Agent",
")",
"Set",
"(",
"c",
"*",
"Config",
")",
"{",
"ca",
".",
"mut",
".",
"Lock",
"(",
")",
"\n",
"defer",
"ca",
".",
"mut",
".",
"Unlock",
"(",
")",
"\n",
"var",
"oldConfig",
"Config",
"\n",
"if",
"ca",
".",
"c",... |
8,504 | all-8505 | [
"Update",
"global",
"Tracer",
"configuration",
"."
] | [
"func",
"UpdateConfig",
"(",
"c",
"GlobalConfig",
")",
"{",
"state",
".",
"m",
".",
"Lock",
"(",
")",
"\n",
"defer",
"state",
".",
"m",
".",
"Unlock",
"(",
")",
"\n\n",
"<mask>",
".",
"c",
"=",
"c",
"\n",
"}"
] |
8,505 | all-8506 | [
"Do",
"executes",
"Storage",
".",
"untrackCacheStorageForOrigin",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"UntrackCacheStorageForOriginParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"<mask>",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandUntrackCacheStorageForOrigin",
",",
"p",
",",
"nil",
... |
8,506 | all-8507 | [
"SliceIndex",
"indexes",
"a",
"slice",
"(",
"a",
"[",
"n",
"]",
")",
".",
"r",
"must",
"contain",
"a",
"slice",
".",
"n",
"must",
"be",
"in",
"bounds",
"for",
"the",
"slice",
"."
] | [
"func",
"(",
"r",
"region",
")",
"SliceIndex",
"(",
"n",
"int64",
")",
"region",
"{",
"if",
"r",
".",
"typ",
".",
"Kind",
"!=",
"KindSlice",
"{",
"panic",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"p",
":=",
"r",
".",
"p",
".",
"proc",
".",
"Rea... |
8,507 | all-8508 | [
"ConcatPermissioner",
"concat",
"permissioner"
] | [
"func",
"ConcatPermissioner",
"(",
"<mask>",
"...",
"Permissioner",
")",
"Permissioner",
"{",
"var",
"newPS",
"[",
"]",
"Permissioner",
"\n",
"for",
"_",
",",
"p",
":=",
"range",
"ps",
"{",
"if",
"p",
"!=",
"nil",
"{",
"newPS",
"=",
"append",
"(",
"new... |
8,508 | all-8509 | [
"Validate",
"that",
"options",
"are",
"usuable"
] | [
"func",
"(",
"opts",
"*",
"Options",
")",
"Validate",
"(",
")",
"error",
"{",
"pwd",
",",
"_",
":=",
"os",
".",
"Getwd",
"(",
")",
"\n",
"if",
"opts",
".",
"App",
".",
"IsZero",
"(",
")",
"{",
"opts",
".",
"App",
"=",
"meta",
".",
"New",
"(",... |
8,509 | all-8510 | [
"Put",
"md5",
"file",
"in",
".",
"md5",
"subdirectory",
"of",
"bucket",
"where",
"the",
"file",
"is",
"stored",
"e",
".",
"g",
".",
"the",
"md5",
"for",
"https",
":",
"//",
"mybucket",
".",
"s3",
".",
"amazonaws",
".",
"com",
"/",
"gof3r",
"will",
... | [
"func",
"(",
"lo",
"*",
"largeObject",
")",
"putMd5",
"(",
")",
"(",
"err",
"error",
")",
"{",
"calcMd5",
":=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"lo",
".",
"md5",
".",
"Sum",
"(",
"nil",
")",
")",
"\n",
"md5Reader",
":=",
"strings",
... |
8,510 | all-8511 | [
"authDisableCommandFunc",
"executes",
"the",
"auth",
"disable",
"command",
"."
] | [
"func",
"authDisableCommandFunc",
"(",
"cmd",
"*",
"cobra",
".",
"Command",
",",
"args",
"[",
"]",
"string",
")",
"{",
"if",
"len",
"(",
"args",
")",
"!=",
"0",
"{",
"ExitWithError",
"(",
"ExitBadArgs",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
")"... |
8,511 | all-8512 | [
"GetProviderSpecificProperty",
"returns",
"a",
"ProviderSpecificProperty",
"if",
"the",
"property",
"exists",
"."
] | [
"func",
"(",
"e",
"*",
"Endpoint",
")",
"GetProviderSpecificProperty",
"(",
"key",
"string",
")",
"(",
"ProviderSpecificProperty",
",",
"bool",
")",
"{",
"for",
"_",
",",
"providerSpecific",
":=",
"<mask>",
"e",
".",
"ProviderSpecific",
"{",
"if",
"providerSpe... |
8,512 | all-8513 | [
"ToArgv",
"converts",
"string",
"s",
"into",
"an",
"argv",
"for",
"exec",
"."
] | [
"func",
"ToArgv",
"(",
"s",
"string",
")",
"[",
"]",
"string",
"{",
"const",
"(",
"InArg",
"=",
"iota",
"\n",
"InArgQuote",
"\n",
"OutOfArg",
"\n",
")",
"\n",
"currentState",
":=",
"OutOfArg",
"\n",
"currentQuoteChar",
":=",
"\"",
"\\x00",
"\"",
"// to d... |
8,513 | all-8514 | [
"urlsEqual",
"checks",
"equality",
"of",
"url",
".",
"URLS",
"between",
"two",
"arrays",
".",
"This",
"check",
"pass",
"even",
"if",
"an",
"URL",
"is",
"in",
"hostname",
"and",
"opposite",
"is",
"in",
"IP",
"address",
"."
] | [
"func",
"urlsEqual",
"(",
"ctx",
"context",
".",
"Context",
",",
"lg",
"*",
"zap",
".",
"Logger",
",",
"a",
"[",
"]",
"url",
".",
"URL",
",",
"b",
"[",
"]",
"url",
".",
"URL",
")",
"(",
"bool",
",",
"error",
")",
"{",
"if",
"len",
"(",
"a",
... |
8,514 | all-8515 | [
"Dist2D",
"derives",
"the",
"distance",
"between",
"v",
"and",
"v2",
"on",
"the",
"xz",
"-",
"plane",
".",
"The",
"vectors",
"are",
"projected",
"onto",
"the",
"xz",
"-",
"plane",
"so",
"the",
"y",
"-",
"values",
"are",
"ignored",
"."
] | [
"func",
"(",
"v",
"Vec3",
")",
"Dist2D",
"(",
"v1",
"Vec3",
")",
"float32",
"{",
"dx",
":=",
"v1",
"[",
"0",
"]",
"-",
"v",
"[",
"0",
"]",
"\n",
"dz",
":=",
"v1",
"[",
"2",
"]",
"-",
"v",
"[",
"2",
"]",
"\n",
"<mask>",
"math32",
".",
"Sqr... |
8,515 | all-8516 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"CollectClassNamesFromSubtreeParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom77",
"(... |
8,516 | all-8517 | [
"Locator",
"returns",
"a",
"locator",
"for",
"the",
"given",
"resource"
] | [
"func",
"(",
"r",
"*",
"RightScriptAttachment",
")",
"Locator",
"(",
"api",
"*",
"API",
")",
"*",
"RightScriptAttachmentLocator",
"{",
"for",
"_",
",",
"l",
":=",
"<mask>",
"r",
".",
"Links",
"{",
"if",
"l",
"[",
"\"",
"\"",
"]",
"==",
"\"",
"\"",
... |
8,517 | all-8518 | [
"/",
"1",
".",
"0",
"/",
"storage",
"-",
"pools",
"/",
"{",
"name",
"}",
"/",
"volumes",
"/",
"{",
"type",
"}",
"List",
"all",
"storage",
"volumes",
"of",
"a",
"given",
"volume",
"type",
"for",
"a",
"given",
"storage",
"pool",
"."
] | [
"func",
"storagePoolVolumesTypeGet",
"(",
"d",
"*",
"Daemon",
",",
"r",
"*",
"http",
".",
"Request",
")",
"<mask>",
"{",
"project",
":=",
"projectParam",
"(",
"r",
")",
"\n\n",
"// Get the name of the pool the storage volume is supposed to be",
"// attached to.",
"poo... |
8,518 | all-8519 | [
"Set",
"a",
"new",
"padding",
"characters",
"for",
"the",
"sequence"
] | [
"func",
"(",
"s",
"*",
"FileSequence",
")",
"SetPadding",
"(",
"padChars",
"<mask>",
")",
"{",
"s",
".",
"padChar",
"=",
"padChars",
"\n",
"s",
".",
"zfill",
"=",
"s",
".",
"padMapper",
".",
"PaddingCharsSize",
"(",
"padChars",
")",
"\n",
"}"
] |
8,519 | all-8520 | [
"Accept",
"waits",
"for",
"and",
"returns",
"the",
"next",
"incoming",
"TLS",
"connection",
"then",
"use",
"the",
"current",
"TLS",
"configuration",
"to",
"handle",
"it",
"."
] | [
"func",
"(",
"l",
"*",
"networkListener",
")",
"Accept",
"(",
")",
"(",
"<mask>",
".",
"Conn",
",",
"error",
")",
"{",
"c",
",",
"err",
":=",
"l",
".",
"Listener",
".",
"Accept",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
"... |
8,520 | all-8521 | [
"Shutdown",
"shutdowns",
"bindSyncer",
"waiting",
"for",
"the",
"current",
"sync",
"to",
"complete"
] | [
"func",
"(",
"b",
"*",
"bindSyncer",
")",
"Shutdown",
"(",
"ctx",
"context",
".",
"Context",
")",
"error",
"{",
"if",
"!",
"b",
".",
"started",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"b",
".",
"shutdown",
"<-",
"struct",
"{",
"}",
"{",
"}",
"\n",... |
8,521 | all-8522 | [
"Create",
"implements",
"ClientInterface"
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"Create",
"(",
"obj",
"Object",
")",
"(",
"Object",
",",
"error",
")",
"{",
"result",
":=",
"c",
".",
"NewObject",
"(",
")",
"\n",
"err",
":=",
"c",
".",
"cl",
".",
"Post",
"(",
")",
".",
"Namespace",
"(",
... |
8,522 | all-8523 | [
"statusToNodeShardsForIndex",
"finds",
"the",
"hosts",
"which",
"contains",
"shards",
"for",
"the",
"given",
"index"
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"statusToNodeShardsForIndex",
"(",
"status",
"Status",
",",
"indexName",
"string",
")",
"(",
"map",
"[",
"uint64",
"]",
"*",
"URI",
",",
"error",
")",
"{",
"result",
":=",
"make",
"(",
"map",
"[",
"uint64",
"]",
... |
8,523 | all-8524 | [
"leaseTimeToLiveCommandFunc",
"executes",
"the",
"lease",
"timetolive",
"command",
"."
] | [
"func",
"leaseTimeToLiveCommandFunc",
"(",
"cmd",
"*",
"cobra",
".",
"Command",
",",
"args",
"[",
"]",
"string",
")",
"{",
"if",
"len",
"(",
"args",
")",
"!=",
"1",
"{",
"ExitWithError",
"(",
"ExitBadArgs",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
... |
8,524 | all-8525 | [
"someDigits",
"formats",
"a",
"zero",
"-",
"prefixed",
"variable",
"-",
"width",
"integer",
"at",
"buf",
".",
"tmp",
"[",
"i",
"]",
"."
] | [
"func",
"(",
"buf",
"*",
"buffer",
")",
"someDigits",
"(",
"i",
",",
"d",
"int",
")",
"int",
"{",
"// Print into the top, then copy down. We know there's space for at least",
"// a 10-digit number.",
"j",
":=",
"len",
"(",
"buf",
".",
"tmp",
")",
"\n",
"for",
"{... |
8,525 | all-8526 | [
"NewPerfDatum",
"returns",
"a",
"PerfDatum",
"object",
"suitable",
"to",
"use",
"in",
"a",
"check",
"result",
".",
"unit",
"must",
"a",
"valid",
"Nagios",
"unit",
"i",
".",
"e",
".",
"one",
"of",
"us",
"ms",
"s",
"%",
"b",
"kb",
"mb",
"gb",
"tb",
"... | [
"func",
"NewPerfDatum",
"(",
"label",
"string",
",",
"unit",
"string",
",",
"<mask>",
"float64",
",",
"thresholds",
"...",
"float64",
")",
"(",
"*",
"PerfDatum",
",",
"error",
")",
"{",
"datum",
":=",
"new",
"(",
"PerfDatum",
")",
"\n",
"datum",
".",
"... |
8,526 | all-8527 | [
"Between",
"check",
"now",
"between",
"the",
"begin",
"end",
"time",
"or",
"not"
] | [
"func",
"Between",
"(",
"time1",
",",
"time2",
"string",
")",
"bool",
"{",
"return",
"New",
"(",
"<mask>",
".",
"Now",
"(",
")",
")",
".",
"Between",
"(",
"time1",
",",
"time2",
")",
"\n",
"}"
] |
8,527 | all-8528 | [
"builds",
"etcd",
"client",
"config",
"depending",
"on",
"connection",
"scheme",
"and",
"TLS",
"parameters"
] | [
"func",
"getETCDConfig",
"(",
")",
"(",
"*",
"etcdcv3",
".",
"Config",
",",
"error",
")",
"{",
"etcdURLsStr",
":=",
"os",
".",
"Getenv",
"(",
"\"",
"\"",
")",
"\n",
"if",
"etcdURLsStr",
"==",
"\"",
"\"",
"{",
"etcdURLsStr",
"=",
"\"",
"\"",
"\n",
"... |
8,528 | all-8529 | [
"MarshalEasyJSON",
"satisfies",
"easyjson",
".",
"Marshaler",
"."
] | [
"func",
"(",
"t",
"MouseType",
")",
"MarshalEasyJSON",
"(",
"out",
"*",
"jwriter",
".",
"Writer",
")",
"{",
"<mask>",
".",
"String",
"(",
"string",
"(",
"t",
")",
")",
"\n",
"}"
] |
8,529 | all-8530 | [
"WritePact",
"should",
"be",
"called",
"writes",
"when",
"all",
"tests",
"have",
"been",
"performed",
"for",
"a",
"given",
"Consumer",
"<",
"-",
">",
"Provider",
"pair",
".",
"It",
"will",
"write",
"out",
"the",
"Pact",
"to",
"the",
"configured",
"file",
... | [
"func",
"(",
"p",
"*",
"Pact",
")",
"WritePact",
"(",
")",
"error",
"{",
"p",
".",
"Setup",
"(",
"true",
")",
"\n",
"log",
".",
"Println",
"(",
"\"",
"\"",
")",
"\n",
"mockServer",
":=",
"MockService",
"{",
"BaseURL",
":",
"fmt",
".",
"Sprintf",
... |
8,530 | all-8531 | [
"UnmarshalEasyJSON",
"satisfies",
"easyjson",
".",
"Unmarshaler",
"."
] | [
"func",
"(",
"t",
"*",
"DetachReason",
")",
"UnmarshalEasyJSON",
"(",
"in",
"*",
"jlexer",
".",
"Lexer",
")",
"{",
"switch",
"DetachReason",
"(",
"in",
".",
"String",
"(",
")",
")",
"{",
"case",
"DetachReasonTargetClosed",
":",
"*",
"t",
"=",
"DetachReas... |
8,531 | all-8532 | [
"VerifyRequest",
"returns",
"a",
"handler",
"that",
"verifies",
"that",
"a",
"request",
"uses",
"the",
"specified",
"method",
"to",
"connect",
"to",
"the",
"specified",
"path",
"You",
"may",
"also",
"pass",
"in",
"an",
"optional",
"rawQuery",
"string",
"which"... | [
"func",
"VerifyRequest",
"(",
"method",
"string",
",",
"path",
"interface",
"{",
"}",
",",
"rawQuery",
"...",
"string",
")",
"http",
".",
"HandlerFunc",
"{",
"return",
"func",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"req",
"*",
"http",
".",
"Reques... |
8,532 | all-8533 | [
"Querier",
"calls",
"f",
"()",
"with",
"the",
"given",
"parameters",
"."
] | [
"func",
"(",
"f",
"QueryableFunc",
")",
"Querier",
"(",
"ctx",
"context",
".",
"<mask>",
",",
"mint",
",",
"maxt",
"int64",
")",
"(",
"Querier",
",",
"error",
")",
"{",
"return",
"f",
"(",
"ctx",
",",
"mint",
",",
"maxt",
")",
"\n",
"}"
] |
8,533 | all-8534 | [
"GetScreen",
"is",
"a",
"wrapper",
"around",
"gtk_widget_get_screen",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Widget",
")",
"GetScreen",
"(",
")",
"(",
"*",
"gdk",
".",
"Screen",
",",
"error",
")",
"{",
"c",
":=",
"C",
".",
"gtk_widget_get_screen",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"if",
"c",
"==",
"nil",
"{",
"<mask... |
8,534 | all-8535 | [
"updateCommandFunc",
"executes",
"the",
"update",
"command",
"."
] | [
"func",
"updateCommandFunc",
"(",
"c",
"*",
"cli",
".",
"Context",
",",
"ki",
"client",
".",
"KeysAPI",
")",
"{",
"if",
"len",
"(",
"c",
".",
"Args",
"(",
")",
")",
"==",
"0",
"{",
"handleError",
"(",
"c",
",",
"ExitBadArgs",
",",
"errors",
".",
... |
8,535 | all-8536 | [
"Writes",
"HTTP",
"response",
"content",
"data",
"."
] | [
"func",
"(",
"c",
"*",
"compressedResponseWriter",
")",
"Write",
"(",
"p",
"[",
"]",
"byte",
")",
"(",
"int",
",",
"error",
")",
"{",
"return",
"c",
".",
"<mask>",
".",
"Write",
"(",
"p",
")",
"\n",
"}"
] |
8,536 | all-8537 | [
"MarshalBinary",
"interface",
"implementation"
] | [
"func",
"(",
"m",
"*",
"TaskWrapper",
")",
"MarshalBinary",
"(",
")",
"(",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"if",
"m",
"==",
"nil",
"{",
"return",
"nil",
",",
"nil",
"\n",
"}",
"\n",
"return",
"swag",
".",
"WriteJSON",
"(",
"m",
")",
... |
8,537 | all-8538 | [
"GetTitle",
"returns",
"the",
"Title",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"c",
"*",
"ChangeDefinition",
")",
"GetTitle",
"(",
")",
"<mask>",
"{",
"if",
"c",
"==",
"nil",
"||",
"c",
".",
"Title",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"c",
".",
"Title",
"\n",
"}"
] |
8,538 | all-8539 | [
"Helpers"
] | [
"func",
"copyRequest",
"(",
"dstRequest",
"*",
"http",
".",
"Request",
",",
"srcRequest",
"*",
"http",
".",
"Request",
",",
"buffer",
"io",
".",
"Reader",
")",
"{",
"*",
"(",
"dstRequest",
")",
"=",
"*",
"(",
"srcRequest",
")",
"\n",
"dstRequest",
".",... |
8,539 | all-8540 | [
"Get",
"returns",
"singleton",
"glg",
"instance"
] | [
"func",
"Get",
"(",
")",
"*",
"Glg",
"{",
"<mask>",
".",
"Do",
"(",
"func",
"(",
")",
"{",
"fastime",
".",
"SetFormat",
"(",
"timeFormat",
")",
"\n",
"glg",
"=",
"New",
"(",
")",
"\n",
"}",
")",
"\n",
"return",
"glg",
"\n",
"}"
] |
8,540 | all-8541 | [
"AddHosts",
"adds",
"a",
"list",
"of",
"hosts",
"to",
"the",
"list",
"of",
"hosts",
"to",
"be",
"scanned"
] | [
"func",
"(",
"s",
"Scan",
")",
"AddHosts",
"(",
"hosts",
"...",
"string",
")",
"Scan",
"{",
"s",
".",
"configHosts",
"=",
"<mask>",
"(",
"s",
".",
"configHosts",
",",
"hosts",
"...",
")",
"\n",
"return",
"s",
"\n",
"}"
] |
8,541 | all-8542 | [
"GetIcon",
"is",
"a",
"wrapper",
"around",
"gtk_window_get_icon",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Window",
")",
"GetIcon",
"(",
")",
"(",
"*",
"gdk",
".",
"Pixbuf",
",",
"<mask>",
")",
"{",
"c",
":=",
"C",
".",
"gtk_window_get_icon",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"if",
"c",
"==",
"nil",
"{",
"return",... |
8,542 | all-8543 | [
"Delete",
"deletes",
"the",
"cache"
] | [
"func",
"(",
"c",
"*",
"FileCache",
")",
"Delete",
"(",
"<mask>",
"string",
")",
"error",
"{",
"return",
"errors",
".",
"Wrap",
"(",
"os",
".",
"Remove",
"(",
"c",
".",
"GetCachePath",
"(",
"key",
")",
")",
",",
"\"",
"\"",
")",
"\n",
"}"
] |
8,543 | all-8544 | [
"Errorf",
"is",
"equivalent",
"to",
"Logf",
"followed",
"by",
"Fail",
"."
] | [
"func",
"(",
"t",
"*",
"T",
")",
"Errorf",
"(",
"format",
"string",
",",
"args",
"...",
"<mask>",
"{",
"}",
")",
"{",
"fmt",
".",
"Fprintf",
"(",
"os",
".",
"Stderr",
",",
"format",
",",
"args",
"...",
")",
"\n",
"t",
".",
"Fail",
"(",
")",
"... |
8,544 | all-8545 | [
"GetGroup",
"gets",
"a",
"group"
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"GetGroup",
"(",
"groupid",
"string",
")",
"(",
"*",
"Group",
",",
"error",
")",
"{",
"url",
":=",
"umGroupPath",
"(",
"groupid",
")",
"+",
"`?depth=`",
"+",
"c",
".",
"client",
".",
"<mask>",
"+",
"`&pretty=`",
... |
8,545 | all-8546 | [
"RoundTrip",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockRoundTripper",
")",
"RoundTrip",
"(",
"arg0",
"*",
"http",
".",
"Request",
")",
"(",
"*",
"<mask>",
".",
"Response",
",",
"error",
")",
"{",
"ret",
":=",
"m",
".",
"ctrl",
".",
"Call",
"(",
"m",
",",
"\"",
"\"",
",",
... |
8,546 | all-8547 | [
"HasLabel",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"w",
"*",
"WidgetMarker",
")",
"HasLabel",
"(",
")",
"bool",
"{",
"if",
"w",
"!=",
"nil",
"&&",
"w",
".",
"<mask>",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
8,547 | all-8548 | [
"rawConnDial",
"dials",
"the",
"underlying",
"net",
".",
"Conn",
"+",
"manet",
".",
"Conns"
] | [
"func",
"(",
"d",
"*",
"Dialer",
")",
"rawConnDial",
"(",
"ctx",
"context",
".",
"Context",
",",
"raddr",
"ma",
".",
"Multiaddr",
",",
"remote",
"peer",
".",
"ID",
")",
"(",
"transport",
".",
"Conn",
",",
"error",
")",
"{",
"if",
"strings",
".",
"H... |
8,548 | all-8549 | [
"expandHostNicFailureCriteria",
"reads",
"certain",
"ResourceData",
"keys",
"and",
"returns",
"a",
"HostNicFailureCriteria",
"."
] | [
"func",
"expandHostNicFailureCriteria",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
")",
"*",
"<mask>",
".",
"HostNicFailureCriteria",
"{",
"obj",
":=",
"&",
"types",
".",
"HostNicFailureCriteria",
"{",
"}",
"\n\n",
"if",
"v",
",",
"ok",
":=",
"d",
".",
... |
8,549 | all-8550 | [
"JSONContext",
"provides",
"the",
"same",
"functionality",
"as",
"JSON",
"with",
"Context",
"instance",
"passing",
"to",
"http",
".",
"Request",
"."
] | [
"func",
"(",
"c",
"Client",
")",
"JSONContext",
"(",
"ctx",
"context",
".",
"Context",
",",
"method",
",",
"path",
"string",
",",
"query",
"<mask>",
".",
"Values",
",",
"body",
"io",
".",
"Reader",
",",
"response",
"interface",
"{",
"}",
")",
"(",
"e... |
8,550 | all-8551 | [
"Your",
"own",
"route",
"middle",
"wrapper"
] | [
"func",
"RouteMiddleware",
"(",
"next",
"r2router",
".",
"HandlerFunc",
")",
"r2router",
".",
"HandlerFunc",
"{",
"return",
"func",
"(",
"w",
"<mask>",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"p",
"r2router",
".",
"Params",
")",
... |
8,551 | all-8552 | [
"New",
"creates",
"a",
"LocalGit",
"and",
"a",
"git",
".",
"Client",
"pointing",
"at",
"it",
"."
] | [
"func",
"New",
"(",
")",
"(",
"*",
"LocalGit",
",",
"*",
"git",
".",
"Client",
",",
"error",
")",
"{",
"g",
",",
"err",
":=",
"exec",
".",
"LookPath",
"(",
"\"",
"\"",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"nil",
","... |
8,552 | all-8553 | [
"Respond",
"without",
"doing",
"anything",
".",
"This",
"endpoint",
"is",
"used",
"to",
"check",
"that",
"the",
"service",
"is",
"up",
".",
"See",
"#ping"
] | [
"func",
"(",
"github",
"*",
"Github",
")",
"Ping",
"(",
")",
"error",
"{",
"<mask>",
":=",
"tcclient",
".",
"Client",
"(",
"*",
"github",
")",
"\n",
"_",
",",
"_",
",",
"err",
":=",
"(",
"&",
"cd",
")",
".",
"APICall",
"(",
"nil",
",",
"\"",
... |
8,553 | all-8554 | [
"UpdateUser",
"updates",
"the",
"User",
"object",
"stored",
"in",
"the",
"session",
".",
"This",
"is",
"useful",
"incase",
"a",
"change",
"is",
"made",
"to",
"the",
"user",
"model",
"that",
"needs",
"to",
"persist",
"across",
"requests",
"."
] | [
"func",
"UpdateUser",
"(",
"s",
"sessions",
".",
"Session",
",",
"<mask>",
"User",
")",
"error",
"{",
"s",
".",
"Set",
"(",
"SessionKey",
",",
"user",
".",
"UniqueId",
"(",
")",
")",
"\n",
"return",
"nil",
"\n",
"}"
] |
8,554 | all-8555 | [
"ContainerProfiles",
"returns",
"a",
"list",
"of",
"profiles",
"for",
"a",
"given",
"container",
"ID",
"."
] | [
"func",
"(",
"c",
"*",
"Cluster",
")",
"ContainerProfiles",
"(",
"id",
"int",
")",
"(",
"[",
"]",
"string",
",",
"error",
")",
"{",
"var",
"name",
"string",
"\n",
"var",
"profiles",
"[",
"]",
"string",
"\n\n",
"query",
":=",
"`\n SELECT name FROM ... |
8,555 | all-8556 | [
"CheckFlags",
"looks",
"for",
"organization",
"and",
"project",
"flags",
"to",
"configure",
"the",
"client"
] | [
"func",
"(",
"<mask>",
"*",
"Client",
")",
"CheckFlags",
"(",
")",
"error",
"{",
"if",
"client",
".",
"Org",
"==",
"\"",
"\"",
"{",
"return",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"client",
".",
"Org",
"=",
"strings",
".",
... |
8,556 | all-8557 | [
"establish",
"data",
"storage",
"format",
"and",
"dimensions",
"of",
"a",
"renderbuffer",
"object",
"s",
"image"
] | [
"func",
"RenderbufferStorage",
"(",
"<mask>",
"uint32",
",",
"internalformat",
"uint32",
",",
"width",
"int32",
",",
"height",
"int32",
")",
"{",
"syscall",
".",
"Syscall6",
"(",
"gpRenderbufferStorage",
",",
"4",
",",
"uintptr",
"(",
"target",
")",
",",
"ui... |
8,557 | all-8558 | [
"Disconnect",
"a",
"Mongo",
"client"
] | [
"func",
"(",
"m",
"*",
"Mongo",
")",
"Disconnect",
"(",
")",
"error",
"{",
"err",
":=",
"m",
".",
"Client",
".",
"Disconnect",
"(",
"m",
".",
"<mask>",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"log",
".",
"Printf",
"(",
"\"",
"\"",
")",
"\n",
... |
8,558 | all-8559 | [
"parseInt",
"parses",
"a",
"string",
"into",
"a",
"base",
"10",
"int"
] | [
"func",
"parseInt",
"(",
"s",
"string",
")",
"(",
"int64",
",",
"error",
")",
"{",
"if",
"s",
"==",
"\"",
"\"",
"{",
"return",
"0",
",",
"nil",
"\n",
"}",
"\n\n",
"<mask>",
",",
"err",
":=",
"strconv",
".",
"ParseInt",
"(",
"s",
",",
"10",
",",... |
8,559 | all-8560 | [
"NormalizedMIMEType",
"returns",
"the",
"effective",
"MIME",
"type",
"of",
"a",
"manifest",
"MIME",
"type",
"returned",
"by",
"a",
"server",
"centralizing",
"various",
"workarounds",
"."
] | [
"func",
"NormalizedMIMEType",
"(",
"input",
"string",
")",
"string",
"{",
"switch",
"input",
"{",
"// \"application/json\" is a valid v2s1 value per https://github.com/docker/distribution/blob/master/docs/spec/manifest-v2-1.md .",
"// This works for now, when nothing else seems to return \"a... |
8,560 | all-8561 | [
"InstallJaegerTracerFromEnv",
"installs",
"a",
"Jaeger",
"client",
"as",
"then",
"opentracing",
"global",
"tracer",
"relying",
"on",
"environment",
"variables",
"to",
"configure",
"the",
"client",
".",
"It",
"returns",
"the",
"address",
"used",
"to",
"initialize",
... | [
"func",
"InstallJaegerTracerFromEnv",
"(",
")",
"{",
"jaegerOnce",
".",
"Do",
"(",
"func",
"(",
")",
"{",
"jaegerEndpoint",
",",
"onUserMachine",
":=",
"os",
".",
"LookupEnv",
"(",
"jaegerEndpointEnvVar",
")",
"\n",
"if",
"!",
"onUserMachine",
"{",
"if",
"ho... |
8,561 | all-8562 | [
"Parameters",
":",
"-",
"Hr"
] | [
"func",
"(",
"p",
"*",
"MetaClient",
")",
"Health",
"(",
"hr",
"*",
"HealthRequest",
")",
"(",
"r",
"*",
"HealthStatus",
",",
"err",
"<mask>",
")",
"{",
"if",
"err",
"=",
"p",
".",
"sendHealth",
"(",
"hr",
")",
";",
"err",
"!=",
"nil",
"{",
"retu... |
8,562 | all-8563 | [
"GetAccessRole",
"returns",
"the",
"AccessRole",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"u",
"*",
"<mask>",
")",
"GetAccessRole",
"(",
")",
"string",
"{",
"if",
"u",
"==",
"nil",
"||",
"u",
".",
"AccessRole",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"u",
".",
"AccessRole",
"\n",
"}"
] |
8,563 | all-8564 | [
"Using",
"the",
"classic",
"API",
"posts",
"a",
"value",
"to",
"a",
"stat",
"using",
"DefaultReporter",
"."
] | [
"func",
"PostValue",
"(",
"statKey",
",",
"userKey",
"string",
",",
"value",
"float64",
")",
"error",
"{",
"return",
"DefaultReporter",
".",
"PostValue",
"(",
"statKey",
",",
"userKey",
",",
"<mask>",
")",
"\n",
"}"
] |
8,564 | all-8565 | [
"LegacyContainersList",
"returns",
"the",
"names",
"of",
"all",
"the",
"containers",
"of",
"the",
"given",
"type",
".",
"NOTE",
":",
"this",
"is",
"a",
"pre",
"-",
"projects",
"legacy",
"API",
"that",
"is",
"used",
"only",
"by",
"patches",
".",
"Don",
"t... | [
"func",
"(",
"c",
"*",
"Cluster",
")",
"LegacyContainersList",
"(",
"cType",
"ContainerType",
")",
"(",
"[",
"]",
"string",
",",
"error",
")",
"{",
"q",
":=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
")",
"\n",
"inargs",
":=",
"[",
"]",
"interface",
... |
8,565 | all-8566 | [
"returns",
"a",
"list",
"of",
"countries",
"where",
"Twilio",
"phone",
"numbers",
"are",
"supported"
] | [
"func",
"(",
"cpnps",
"*",
"CountryPhoneNumberPriceService",
")",
"GetPage",
"(",
"ctx",
"context",
".",
"Context",
",",
"<mask>",
"url",
".",
"Values",
")",
"(",
"*",
"CountriesPricePage",
",",
"error",
")",
"{",
"return",
"cpnps",
".",
"GetPageIterator",
"... |
8,566 | all-8567 | [
"specify",
"a",
"one",
"-",
"dimensional",
"texture",
"subimage",
"in",
"a",
"compressed",
"format"
] | [
"func",
"CompressedTextureSubImage1D",
"(",
"texture",
"uint32",
",",
"level",
"int32",
",",
"xoffset",
"int32",
",",
"width",
"int32",
",",
"format",
"uint32",
",",
"imageSize",
"int32",
",",
"data",
"unsafe",
".",
"Pointer",
")",
"{",
"syscall",
".",
"Sysc... |
8,567 | all-8568 | [
"Do",
"executes",
"Browser",
".",
"crashGpuProcess",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"CrashGpuProcessParams",
")",
"Do",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandCrashGpuProcess",
",",
"nil",
",",
"nil",
")",
"\n",
"}"
] |
8,568 | all-8569 | [
"AnalyzeDefinition",
"analyzes",
"a",
"definition",
"which",
"is",
"an",
"object",
".",
"Definitions",
"are",
"referenced",
"by",
"both",
"inputs",
"to",
"requests",
"(",
"parameters",
")",
"and",
"outputs",
"from",
"requests",
"(",
"return",
"types",
")",
"."... | [
"func",
"(",
"a",
"*",
"APIAnalyzer",
")",
"AnalyzeDefinition",
"(",
"ec",
"EvalCtx",
",",
"def",
"*",
"Definition",
",",
"refID",
"string",
")",
"gen",
".",
"DataType",
"{",
"switch",
"def",
".",
"Type",
"{",
"case",
"\"",
"\"",
":",
"elemT",
":=",
... |
8,569 | all-8570 | [
"DeleteMetricClusterByCID",
"deletes",
"metric",
"cluster",
"with",
"passed",
"cid",
"."
] | [
"func",
"(",
"a",
"*",
"API",
")",
"DeleteMetricClusterByCID",
"(",
"cid",
"CIDType",
")",
"(",
"bool",
",",
"error",
")",
"{",
"if",
"cid",
"==",
"nil",
"||",
"*",
"cid",
"==",
"\"",
"\"",
"{",
"return",
"false",
",",
"fmt",
".",
"Errorf",
"(",
... |
8,570 | all-8571 | [
"CreateCommentReaction",
"responds",
"emotionally",
"to",
"comment",
"id",
"in",
"org",
"/",
"repo",
".",
"See",
"https",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"reactions",
"/",
"#create",
"-",
"reaction",
"-",
"for",
"-",
"a... | [
"func",
"(",
"c",
"*",
"Client",
")",
"CreateCommentReaction",
"(",
"org",
",",
"repo",
"string",
",",
"id",
"int",
",",
"reaction",
"string",
")",
"error",
"{",
"c",
".",
"log",
"(",
"\"",
"\"",
",",
"org",
",",
"repo",
",",
"id",
",",
"reaction",... |
8,571 | all-8572 | [
"GetString",
"reads",
"a",
"ResourceData",
"and",
"returns",
"a",
"*",
"string",
".",
"This",
"differs",
"from",
"GetStringPtr",
"in",
"that",
"a",
"nil",
"value",
"is",
"never",
"returned",
"."
] | [
"func",
"GetString",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"<mask>",
"string",
")",
"*",
"string",
"{",
"return",
"StringPtr",
"(",
"d",
".",
"Get",
"(",
"key",
")",
".",
"(",
"string",
")",
")",
"\n",
"}"
] |
8,572 | all-8573 | [
"PSCBalanceOf",
"calls",
"balanceOf",
"method",
"of",
"Privatix",
"service",
"contract",
"."
] | [
"func",
"(",
"b",
"*",
"backendInstance",
")",
"PSCBalanceOf",
"(",
"opts",
"*",
"bind",
".",
"CallOpts",
",",
"owner",
"common",
".",
"Address",
")",
"(",
"uint64",
",",
"error",
")",
"{",
"ctx2",
",",
"cancel",
":=",
"b",
".",
"addTimeout",
"(",
"o... |
8,573 | all-8574 | [
"incrementNumPendingJobs",
"increments",
"the",
"amount",
"of",
"pending",
"ProwJobs",
"for",
"the",
"given",
"job",
"identifier"
] | [
"func",
"(",
"c",
"*",
"Controller",
")",
"incrementNumPendingJobs",
"(",
"job",
"string",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"<mask>",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"pendingJobs",
"[",
"job",
"]"... |
8,574 | all-8575 | [
"StartInitialization",
"loads",
"a",
"container",
"by",
"opening",
"the",
"pipe",
"fd",
"from",
"the",
"parent",
"to",
"read",
"the",
"configuration",
"and",
"state",
"This",
"is",
"a",
"low",
"level",
"implementation",
"detail",
"of",
"the",
"reexec",
"and",
... | [
"func",
"(",
"l",
"*",
"LinuxFactory",
")",
"StartInitialization",
"(",
")",
"(",
"err",
"error",
")",
"{",
"pipefd",
",",
"err",
":=",
"strconv",
".",
"Atoi",
"(",
"os",
".",
"Getenv",
"(",
"\"",
"\"",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"... |
8,575 | all-8576 | [
"DeepCopyObject",
"implements",
"the",
"runtime",
".",
"Object",
"interface"
] | [
"func",
"(",
"in",
"*",
"ResourcesConfigCollection",
")",
"DeepCopyObject",
"(",
")",
"runtime",
".",
"<mask>",
"{",
"if",
"c",
":=",
"in",
".",
"deepCopy",
"(",
")",
";",
"c",
"!=",
"nil",
"{",
"return",
"c",
"\n",
"}",
"\n",
"return",
"nil",
"\n",
... |
8,576 | all-8577 | [
"/",
"*",
"Error",
"uses",
"msg",
"as",
"a",
"format",
"string",
"with",
"subsequent",
"parameters",
"as",
"values",
"and",
"logs",
"the",
"resulting",
"message",
"to",
"all",
"added",
"loggers",
"at",
"LogLevel",
".",
"LevelError"
] | [
"func",
"(",
"la",
"*",
"LogAdapter",
")",
"Error",
"(",
"msg",
"string",
")",
"error",
"{",
"return",
"la",
".",
"<mask>",
"(",
"LevelError",
",",
"nil",
",",
"msg",
")",
"\n",
"}"
] |
8,577 | all-8578 | [
"ParseReference",
"converts",
"a",
"string",
"which",
"should",
"not",
"start",
"with",
"the",
"ImageTransport",
".",
"Name",
"prefix",
"into",
"an",
"OpenShift",
"ImageReference",
"."
] | [
"func",
"ParseReference",
"(",
"ref",
"string",
")",
"(",
"types",
".",
"ImageReference",
",",
"error",
")",
"{",
"r",
",",
"err",
":=",
"reference",
".",
"ParseNormalizedNamed",
"(",
"ref",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",... |
8,578 | all-8579 | [
"Get",
"sends",
"a",
"GET",
"request",
"and",
"marshals",
"response",
"data",
"into",
"holder"
] | [
"func",
"(",
"c",
"<mask>",
")",
"Get",
"(",
"path",
"string",
",",
"params",
"interface",
"{",
"}",
",",
"holder",
"interface",
"{",
"}",
")",
"error",
"{",
"return",
"c",
".",
"rpc",
".",
"Request",
"(",
"\"",
"\"",
",",
"path",
",",
"params",
... |
8,579 | all-8580 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"SignedCertificateTimestamp",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"<mask>",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork9",
"(",
... |
8,580 | all-8581 | [
"Commits",
"returns",
"a",
"collection",
"of",
"commits"
] | [
"func",
"Commits",
"(",
"etcdClient",
"*",
"etcd",
".",
"Client",
",",
"etcdPrefix",
"string",
",",
"repo",
"string",
")",
"col",
".",
"Collection",
"{",
"return",
"col",
".",
"NewCollection",
"(",
"etcdClient",
",",
"path",
".",
"Join",
"(",
"etcdPrefix",... |
8,581 | all-8582 | [
"Removes",
"an",
"element",
"from",
"the",
"middle",
"of",
"a",
"sequence",
"."
] | [
"func",
"(",
"seq",
"*",
"Seq",
")",
"RemoveAt",
"(",
"index",
"int",
")",
"{",
"C",
".",
"cvSeqRemove",
"(",
"(",
"*",
"C",
".",
"struct_CvSeq",
")",
"(",
"seq",
")",
",",
"C",
".",
"int",
"(",
"<mask>",
")",
")",
"\n",
"}"
] |
8,582 | all-8583 | [
"bind",
"a",
"range",
"within",
"a",
"buffer",
"object",
"to",
"a",
"transform",
"feedback",
"buffer",
"object"
] | [
"func",
"TransformFeedbackBufferRange",
"(",
"xfb",
"uint32",
",",
"index",
"uint32",
",",
"<mask>",
"uint32",
",",
"offset",
"int",
",",
"size",
"int",
")",
"{",
"C",
".",
"glowTransformFeedbackBufferRange",
"(",
"gpTransformFeedbackBufferRange",
",",
"(",
"C",
... |
8,583 | all-8584 | [
"GetFinishings",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_print_settings_get_finishings",
"()",
"."
] | [
"func",
"(",
"<mask>",
"*",
"PrintSettings",
")",
"GetFinishings",
"(",
")",
"string",
"{",
"c",
":=",
"C",
".",
"gtk_print_settings_get_finishings",
"(",
"ps",
".",
"native",
"(",
")",
")",
"\n",
"return",
"C",
".",
"GoString",
"(",
"(",
"*",
"C",
"."... |
8,584 | all-8585 | [
"ContainerByID",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockTaskEngineState",
")",
"ContainerByID",
"(",
"arg0",
"string",
")",
"(",
"*",
"<mask>",
".",
"DockerContainer",
",",
"bool",
")",
"{",
"ret",
":=",
"m",
".",
"ctrl",
".",
"Call",
"(",
"m",
",",
"\"",
"\"",
",",
"arg0",
"... |
8,585 | all-8586 | [
"Make",
"sure",
"the",
"local",
"Write",
"is",
"called",
"."
] | [
"func",
"(",
"w",
"*",
"recorderResponseWriter",
")",
"WriteJson",
"(",
"v",
"<mask>",
"{",
"}",
")",
"error",
"{",
"b",
",",
"err",
":=",
"w",
".",
"EncodeJson",
"(",
"v",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n... |
8,586 | all-8587 | [
"getGoPath",
"returns",
"a",
"single",
"GOPATH",
".",
"If",
"there",
"are",
"multiple",
"defined",
"in",
"the",
"users",
"$GOPATH",
"env",
"variable",
"then",
"getGoPath",
"validates",
"that",
"the",
"working",
"directory",
"is",
"part",
"of",
"one",
"of",
"... | [
"func",
"getGoPath",
"(",
")",
"(",
"string",
",",
"error",
")",
"{",
"wd",
",",
"err",
":=",
"<mask>",
".",
"Getwd",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"\"",
"\"",
",",
"err",
"\n",
"}",
"\n\n",
"gopath",
":=",
"os",
".",... |
8,587 | all-8588 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"MarkUndoableStateParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom31",
"(",
"&",
"w",
",",
"v",
"... |
8,588 | all-8589 | [
"flushAll",
"flushes",
"all",
"the",
"logs",
"and",
"attempts",
"to",
"sync",
"their",
"data",
"to",
"disk",
".",
"l",
".",
"mu",
"is",
"held",
"."
] | [
"func",
"(",
"l",
"*",
"Log",
")",
"flushAll",
"(",
")",
"{",
"// Flush from fatal down, in case there's trouble flushing.",
"for",
"s",
":=",
"FatalLog",
";",
"s",
">=",
"InfoLog",
";",
"s",
"--",
"{",
"file",
":=",
"l",
".",
"file",
"[",
"s",
"]",
"\n"... |
8,589 | all-8590 | [
"splitPath",
"splits",
"a",
"path",
"into",
"its",
"components",
".",
"The",
"first",
"item",
"has",
"its",
"initial",
"path",
"separator",
"kept",
"."
] | [
"func",
"splitPath",
"(",
"p",
"string",
")",
"[",
"]",
"string",
"{",
"if",
"p",
"==",
"\"",
"\"",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"var",
"out",
"[",
"]",
"string",
"\n",
"s",
":=",
"\"",
"\"",
"\n",
"for",
"_",
",",
"c",
":=",
"range... |
8,590 | all-8591 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"SetBreakpointOnFunctionCallReturns",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"<mask>",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger12... |
8,591 | all-8592 | [
"Save",
"saves",
"the",
"cedar",
"to",
"an",
"io",
".",
"Writer",
"where",
"dataType",
"is",
"either",
"json",
"or",
"gob",
"."
] | [
"func",
"(",
"da",
"*",
"Cedar",
")",
"Save",
"(",
"out",
"io",
".",
"Writer",
",",
"dataType",
"string",
")",
"error",
"{",
"switch",
"dataType",
"{",
"case",
"\"",
"\"",
",",
"\"",
"\"",
":",
"dataEecoder",
":=",
"gob",
".",
"NewEncoder",
"(",
"o... |
8,592 | all-8593 | [
"NewDiscovery",
"returns",
"a",
"new",
"Discovery",
"for",
"the",
"given",
"config",
"."
] | [
"func",
"NewDiscovery",
"(",
"conf",
"*",
"SDConfig",
",",
"logger",
"log",
".",
"Logger",
")",
"(",
"*",
"Discovery",
",",
"error",
")",
"{",
"if",
"logger",
"==",
"nil",
"{",
"logger",
"=",
"log",
".",
"NewNopLogger",
"(",
")",
"\n",
"}",
"\n\n",
... |
8,593 | all-8594 | [
"ListCommit",
"lists",
"commits",
".",
"If",
"only",
"repo",
"is",
"given",
"all",
"commits",
"in",
"the",
"repo",
"are",
"returned",
".",
"If",
"to",
"is",
"given",
"only",
"the",
"ancestors",
"of",
"to",
"including",
"to",
"itself",
"are",
"considered",
... | [
"func",
"(",
"c",
"APIClient",
")",
"ListCommit",
"(",
"repoName",
"string",
",",
"to",
"string",
",",
"from",
"string",
",",
"number",
"uint64",
")",
"(",
"[",
"]",
"*",
"pfs",
".",
"CommitInfo",
",",
"error",
")",
"{",
"<mask>",
"result",
"[",
"]",... |
8,594 | all-8595 | [
"SignalGoString",
"returns",
"the",
"value",
"of",
"the",
"os",
".",
"Signal",
"for",
"printing",
"in",
"a",
"string",
"."
] | [
"func",
"SignalGoString",
"(",
"s",
"*",
"<mask>",
".",
"Signal",
")",
"string",
"{",
"if",
"s",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"if",
"*",
"s",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"fmt",
... |
8,595 | all-8596 | [
"NewV3",
"creates",
"a",
"new",
"UUID",
"with",
"variant",
"3",
"as",
"described",
"in",
"RFC",
"4122",
".",
"Variant",
"3",
"based",
"namespace",
"-",
"uuid",
"and",
"name",
"and",
"MD",
"-",
"5",
"hash",
"calculation",
"."
] | [
"func",
"NewV3",
"(",
"namespace",
"*",
"UUID",
",",
"name",
"[",
"]",
"byte",
")",
"*",
"UUID",
"{",
"uuid",
":=",
"newByHash",
"(",
"md5",
".",
"New",
"(",
")",
",",
"namespace",
",",
"<mask>",
")",
"\n",
"uuid",
"[",
"6",
"]",
"=",
"(",
"uui... |
8,596 | all-8597 | [
"Errorm",
"executes",
"the",
"same",
"function",
"on",
"the",
"default",
"Base",
"instance"
] | [
"func",
"Errorm",
"(",
"m",
"*",
"Attrs",
",",
"msg",
"string",
",",
"a",
"...",
"<mask>",
"{",
"}",
")",
"error",
"{",
"return",
"curDefault",
".",
"Errorm",
"(",
"m",
",",
"msg",
",",
"a",
"...",
")",
"\n",
"}"
] |
8,597 | all-8598 | [
"NewTrustLineEntryExt",
"creates",
"a",
"new",
"TrustLineEntryExt",
"."
] | [
"func",
"NewTrustLineEntryExt",
"(",
"v",
"int32",
",",
"<mask>",
"interface",
"{",
"}",
")",
"(",
"result",
"TrustLineEntryExt",
",",
"err",
"error",
")",
"{",
"result",
".",
"V",
"=",
"v",
"\n",
"switch",
"int32",
"(",
"v",
")",
"{",
"case",
"0",
"... |
8,598 | all-8599 | [
"Tournaments",
"related",
"functions",
"and",
"methods"
] | [
"func",
"(",
"t",
"Tournaments",
")",
"GroupByMonths",
"(",
"season",
"int",
")",
"map",
"[",
"time",
".",
"Month",
"]",
"Tournaments",
"{",
"byMonth",
":=",
"make",
"(",
"map",
"[",
"time",
".",
"Month",
"]",
"Tournaments",
")",
"\n\n",
"for",
"_",
... |
8,599 | all-8600 | [
"DepEnsure",
"runs",
"dep",
"ensure",
"-",
"v",
"or",
"go",
"get",
"-",
"u",
"depending",
"on",
"app",
"tooling",
"to",
"make",
"sure",
"that",
"any",
"newly",
"changed",
"imports",
"are",
"added",
"to",
"dep",
"or",
"installed",
"."
] | [
"func",
"DepEnsure",
"(",
"r",
"*",
"Runner",
")",
"error",
"{",
"if",
"r",
".",
"App",
".",
"WithPop",
"{",
"upkg",
"=",
"<mask>",
"(",
"upkg",
",",
"\"",
"\"",
",",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"if",
"!",
"r",
".",
"App",
".",
"WithDep... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.