id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
9,100 | all-9101 | [
"NewSelectiveStringValue",
"creates",
"a",
"new",
"string",
"flag",
"for",
"which",
"any",
"one",
"of",
"the",
"given",
"strings",
"is",
"a",
"valid",
"value",
"and",
"any",
"other",
"value",
"is",
"an",
"error",
".",
"valids",
"[",
"0",
"]",
"will",
"be... | [
"func",
"NewSelectiveStringValue",
"(",
"valids",
"...",
"string",
")",
"*",
"SelectiveStringValue",
"{",
"vm",
":=",
"<mask>",
"(",
"map",
"[",
"string",
"]",
"struct",
"{",
"}",
")",
"\n",
"for",
"_",
",",
"v",
":=",
"range",
"valids",
"{",
"vm",
"["... |
9,101 | all-9102 | [
"PreferLocalStorageFilter",
"returns",
"a",
"QueryableFunc",
"which",
"creates",
"a",
"NoopQuerier",
"if",
"requested",
"timeframe",
"can",
"be",
"answered",
"completely",
"by",
"the",
"local",
"TSDB",
"and",
"reduces",
"maxt",
"if",
"the",
"timeframe",
"can",
"be... | [
"func",
"PreferLocalStorageFilter",
"(",
"next",
"storage",
".",
"Queryable",
",",
"cb",
"startTimeCallback",
")",
"storage",
".",
"Queryable",
"{",
"return",
"storage",
".",
"QueryableFunc",
"(",
"func",
"(",
"ctx",
"context",
".",
"Context",
",",
"mint",
","... |
9,102 | all-9103 | [
"Marshal",
"passes",
"a",
"Field",
"instance",
"through",
"to",
"the",
"appropriate",
"field",
"-",
"type",
"-",
"specific",
"method",
"of",
"an",
"Encoder",
"."
] | [
"func",
"(",
"lf",
"Field",
")",
"Marshal",
"(",
"visitor",
"Encoder",
")",
"{",
"switch",
"lf",
".",
"fieldType",
"{",
"case",
"stringType",
":",
"visitor",
".",
"EmitString",
"(",
"lf",
".",
"key",
",",
"lf",
".",
"stringVal",
")",
"\n",
"case",
"b... |
9,103 | all-9104 | [
"Destroy",
"cleans",
"up",
"the",
"on",
"disk",
"structures",
"for",
"the",
"hashtree",
"."
] | [
"func",
"(",
"h",
"*",
"dbHashTree",
")",
"Destroy",
"(",
")",
"error",
"{",
"path",
":=",
"h",
".",
"<mask>",
"(",
")",
"\n",
"if",
"err",
":=",
"h",
".",
"Close",
"(",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"re... |
9,104 | all-9105 | [
"update",
"returns",
"runs",
"the",
"specified",
"fn",
"within",
"a",
"read",
"-",
"write",
"transaction",
"on",
"the",
"database",
"."
] | [
"func",
"(",
"bdc",
"*",
"cache",
")",
"update",
"(",
"fn",
"func",
"(",
"tx",
"*",
"bolt",
".",
"Tx",
")",
"error",
")",
"(",
"retErr",
"error",
")",
"{",
"lockPath",
"(",
"bdc",
".",
"path",
")",
"\n",
"defer",
"unlockPath",
"(",
"bdc",
".",
... |
9,105 | all-9106 | [
"SetHeader",
"sets",
"a",
"value",
"to",
"the",
"given",
"header",
"field",
"."
] | [
"func",
"(",
"m",
"*",
"Message",
")",
"SetHeader",
"(",
"field",
"string",
",",
"value",
"...",
"string",
")",
"{",
"m",
".",
"encodeHeader",
"(",
"value",
")",
"\n",
"m",
".",
"<mask>",
"[",
"field",
"]",
"=",
"value",
"\n",
"}"
] |
9,106 | all-9107 | [
"UintVar",
"defines",
"a",
"uint",
"flag",
"with",
"specified",
"name",
"default",
"value",
"and",
"usage",
"string",
".",
"The",
"argument",
"p",
"points",
"to",
"a",
"uint",
"variable",
"in",
"which",
"to",
"store",
"the",
"value",
"of",
"the",
"flag",
... | [
"func",
"UintVar",
"(",
"p",
"*",
"uint",
",",
"name",
"string",
",",
"value",
"uint",
",",
"usage",
"string",
")",
"{",
"EnvironmentFlags",
".",
"UintVar",
"(",
"p",
",",
"name",
",",
"value",
",",
"<mask>",
")",
"\n",
"}"
] |
9,107 | all-9108 | [
"/",
"*",
"The",
"same",
"as",
"client",
".",
"Trigger",
"except",
"one",
"passes",
"in",
"a",
"slice",
"of",
"channels",
"as",
"the",
"first",
"parameter",
".",
"The",
"maximum",
"length",
"of",
"channels",
"is",
"100",
".",
"client",
".",
"TriggerMulti... | [
"func",
"(",
"c",
"*",
"Client",
")",
"TriggerMulti",
"(",
"channels",
"[",
"]",
"string",
",",
"eventName",
"string",
",",
"data",
"interface",
"{",
"}",
")",
"(",
"*",
"BufferedEvents",
",",
"error",
")",
"{",
"return",
"c",
".",
"<mask>",
"(",
"ch... |
9,108 | all-9109 | [
"GetPage",
"retrieves",
"an",
"IncomingPhoneNumberPage",
"filtered",
"by",
"the",
"given",
"data",
"."
] | [
"func",
"(",
"ins",
"*",
"IncomingNumberService",
")",
"GetPage",
"(",
"ctx",
"context",
".",
"Context",
",",
"<mask>",
"url",
".",
"Values",
")",
"(",
"*",
"IncomingPhoneNumberPage",
",",
"error",
")",
"{",
"iter",
":=",
"ins",
".",
"GetPageIterator",
"("... |
9,109 | all-9110 | [
"NewManager",
"is",
"the",
"Discovery",
"Manager",
"constructor",
"."
] | [
"func",
"NewManager",
"(",
"ctx",
"context",
".",
"Context",
",",
"logger",
"log",
".",
"Logger",
",",
"options",
"...",
"func",
"(",
"*",
"<mask>",
")",
")",
"*",
"Manager",
"{",
"if",
"logger",
"==",
"nil",
"{",
"logger",
"=",
"log",
".",
"NewNopLo... |
9,110 | all-9111 | [
"TakeWhile",
"creates",
"a",
"reusable",
"stream",
"which",
"will",
"halt",
"once",
"some",
"criteria",
"is",
"no",
"longer",
"met",
"."
] | [
"func",
"TakeWhile",
"(",
"subject",
"Enumerable",
",",
"criteria",
"func",
"(",
"<mask>",
"{",
"}",
",",
"uint",
")",
"bool",
")",
"Enumerable",
"{",
"return",
"takeWhiler",
"{",
"original",
":",
"subject",
",",
"criteria",
":",
"criteria",
",",
"}",
"\... |
9,111 | all-9112 | [
"RemoveAttribute",
"removes",
"attribute",
"with",
"given",
"name",
"from",
"an",
"element",
"with",
"given",
"id",
".",
"See",
":",
"https",
":",
"//",
"chromedevtools",
".",
"github",
".",
"io",
"/",
"devtools",
"-",
"protocol",
"/",
"tot",
"/",
"DOM#met... | [
"func",
"RemoveAttribute",
"(",
"nodeID",
"cdp",
".",
"NodeID",
",",
"name",
"string",
")",
"*",
"RemoveAttributeParams",
"{",
"return",
"&",
"RemoveAttributeParams",
"{",
"NodeID",
":",
"nodeID",
",",
"<mask>",
":",
"name",
",",
"}",
"\n",
"}"
] |
9,112 | all-9113 | [
"GetApmQueryOk",
"returns",
"a",
"tuple",
"with",
"the",
"ApmQuery",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"q",
"*",
"QueryValueRequest",
")",
"GetApmQueryOk",
"(",
")",
"(",
"WidgetApmOrLogQuery",
",",
"bool",
")",
"{",
"if",
"q",
"==",
"nil",
"||",
"q",
".",
"ApmQuery",
"==",
"nil",
"{",
"return",
"WidgetApmOrLogQuery",
"{",
"}",
",",
"false",
... |
9,113 | all-9114 | [
"Registers",
"a",
"signal",
"handler",
"to",
"execute",
"the",
"specified",
"Tracer",
"upon",
"receipt",
"of",
"any",
"signal",
"in",
"the",
"set",
"specified",
"by",
"TracerSig",
".",
"Sigset",
"()",
".",
"If",
"the",
"GlobalConfiguration",
"value",
"ResendSi... | [
"func",
"Register",
"(",
"t",
"TracerSig",
")",
"{",
"ss",
":=",
"t",
".",
"Sigset",
"(",
")",
"\n",
"if",
"ss",
"==",
"nil",
"||",
"len",
"(",
"ss",
")",
"==",
"0",
"{",
"t",
".",
"Logf",
"(",
"LogError",
",",
"\"",
"\"",
"+",
"\"",
"\\n",
... |
9,114 | all-9115 | [
"Check",
"scans",
"the",
"Path",
"for",
"any",
"recursive",
"transformers",
"and",
"panics",
"when",
"any",
"recursive",
"transformers",
"are",
"detected",
".",
"Note",
"that",
"the",
"presence",
"of",
"a",
"recursive",
"Transformer",
"does",
"not",
"necessarily... | [
"func",
"(",
"rc",
"*",
"recChecker",
")",
"Check",
"(",
"p",
"Path",
")",
"{",
"const",
"minLen",
"=",
"1",
"<<",
"16",
"\n",
"if",
"rc",
".",
"next",
"==",
"0",
"{",
"rc",
".",
"next",
"=",
"minLen",
"\n",
"}",
"\n",
"if",
"len",
"(",
"p",
... |
9,115 | all-9116 | [
"GetPrinter",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_print_settings_get_printer",
"()",
"."
] | [
"func",
"(",
"<mask>",
"*",
"PrintSettings",
")",
"GetPrinter",
"(",
")",
"string",
"{",
"c",
":=",
"C",
".",
"gtk_print_settings_get_printer",
"(",
"ps",
".",
"native",
"(",
")",
")",
"\n",
"return",
"C",
".",
"GoString",
"(",
"(",
"*",
"C",
".",
"c... |
9,116 | all-9117 | [
"GetMetricQueryOk",
"returns",
"a",
"tuple",
"with",
"the",
"MetricQuery",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"d",
"*",
"DistributionRequest",
")",
"GetMetricQueryOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"d",
"==",
"nil",
"||",
"d",
".",
"MetricQuery",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"<mask>",
"\n",
"}",
"\n",
"r... |
9,117 | all-9118 | [
"retrieve",
"information",
"about",
"the",
"set",
"of",
"active",
"atomic",
"counter",
"buffers",
"for",
"a",
"program"
] | [
"func",
"GetActiveAtomicCounterBufferiv",
"(",
"<mask>",
"uint32",
",",
"bufferIndex",
"uint32",
",",
"pname",
"uint32",
",",
"params",
"*",
"int32",
")",
"{",
"C",
".",
"glowGetActiveAtomicCounterBufferiv",
"(",
"gpGetActiveAtomicCounterBufferiv",
",",
"(",
"C",
".... |
9,118 | all-9119 | [
"Handle",
"registers",
"a",
"new",
"request",
"handle",
"with",
"the",
"given",
"pattern",
"method",
"and",
"handlers",
"."
] | [
"func",
"(",
"r",
"*",
"Router",
")",
"Handle",
"(",
"method",
"string",
",",
"pattern",
"string",
",",
"handlers",
"[",
"]",
"Handler",
")",
"*",
"Route",
"{",
"if",
"len",
"(",
"r",
".",
"groups",
")",
">",
"0",
"{",
"groupPattern",
":=",
"\"",
... |
9,119 | all-9120 | [
"Name",
"of",
"go",
"type",
"for",
"resource",
"with",
"given",
"name",
"It",
"should",
"always",
"be",
"the",
"same",
"(",
"camelized",
")",
"but",
"there",
"are",
"some",
"resources",
"that",
"don",
"t",
"have",
"a",
"media",
"type",
"so",
"for",
"th... | [
"func",
"resourceType",
"(",
"resName",
"string",
")",
"string",
"{",
"if",
"resName",
"==",
"\"",
"\"",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"if",
"_",
",",
"<mask>",
":=",
"noMediaTypeResources",
"[",
"resName",
"]",
";",
"ok",
"{",
"return",
... |
9,120 | all-9121 | [
"FetchRuleSets",
"retrieves",
"all",
"rule",
"sets",
"available",
"to",
"API",
"Token",
"."
] | [
"func",
"(",
"a",
"*",
"API",
")",
"FetchRuleSets",
"(",
")",
"(",
"*",
"[",
"]",
"RuleSet",
",",
"error",
")",
"{",
"result",
",",
"err",
":=",
"a",
".",
"Get",
"(",
"config",
".",
"RuleSetPrefix",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"re... |
9,121 | all-9122 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"GetAppManifestParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage43",
"(",
"&",
"... |
9,122 | all-9123 | [
"title",
":",
"run",
"commands",
"path",
":",
"/",
"apps",
"/",
"{",
"app",
"}",
"/",
"run",
"consume",
":",
"application",
"/",
"x",
"-",
"www",
"-",
"form",
"-",
"urlencoded",
"produce",
":",
"application",
"/",
"x",
"-",
"json",
"-",
"stream",
"... | [
"func",
"runCommand",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"<mask>",
".",
"Request",
",",
"t",
"auth",
".",
"Token",
")",
"(",
"err",
"error",
")",
"{",
"msg",
":=",
"\"",
"\"",
"\n",
"command",
":=",
"InputValue",
"(",
"r",
",",... |
9,123 | all-9124 | [
"NewSyncFolderFontCache",
"creates",
"SyncFolderFontCache"
] | [
"func",
"NewSyncFolderFontCache",
"(",
"folder",
"string",
")",
"*",
"SyncFolderFontCache",
"{",
"return",
"&",
"SyncFolderFontCache",
"{",
"fonts",
":",
"make",
"(",
"map",
"[",
"string",
"]",
"*",
"truetype",
".",
"Font",
")",
",",
"folder",
":",
"<mask>",... |
9,124 | all-9125 | [
"Serve",
"starts",
"all",
"added",
"servers",
".",
"New",
"new",
"servers",
"must",
"be",
"added",
"after",
"this",
"methid",
"is",
"called",
"."
] | [
"func",
"(",
"s",
"*",
"Servers",
")",
"Serve",
"(",
")",
"(",
"err",
"error",
")",
"{",
"lns",
":=",
"make",
"(",
"[",
"]",
"net",
".",
"Listener",
",",
"len",
"(",
"s",
".",
"servers",
")",
")",
"\n",
"conns",
":=",
"make",
"(",
"[",
"]",
... |
9,125 | all-9126 | [
"GetKubernetesClient",
"retrieves",
"the",
"Kubernetes",
"cluster",
"client",
"from",
"within",
"the",
"cluster"
] | [
"func",
"GetProwJobClient",
"(",
"masterURL",
",",
"kubeConfig",
"<mask>",
")",
"(",
"prowjobclientset",
".",
"Interface",
",",
"error",
")",
"{",
"config",
",",
"err",
":=",
"loadClusterConfig",
"(",
"masterURL",
",",
"kubeConfig",
")",
"\n",
"if",
"err",
"... |
9,126 | all-9127 | [
"Size",
"returns",
"the",
"size",
"of",
"x",
"in",
"bytes",
"."
] | [
"func",
"(",
"p",
"*",
"Process",
")",
"Size",
"(",
"x",
"<mask>",
")",
"int64",
"{",
"return",
"p",
".",
"findHeapInfo",
"(",
"core",
".",
"Address",
"(",
"x",
")",
")",
".",
"size",
"\n",
"}"
] |
9,127 | all-9128 | [
"See",
"the",
"documentation",
"for",
"Index",
"for",
"details",
"."
] | [
"func",
"(",
"c",
"*",
"collection",
")",
"indexDir",
"(",
"index",
"*",
"Index",
",",
"indexVal",
"interface",
"{",
"}",
")",
"string",
"{",
"var",
"indexValStr",
"string",
"\n",
"if",
"marshaller",
",",
"ok",
":=",
"indexVal",
".",
"(",
"proto",
".",... |
9,128 | all-9129 | [
"SetBSON",
"sets",
"the",
"Base64",
"from",
"raw",
"bson",
"data"
] | [
"func",
"(",
"b",
"*",
"Base64",
")",
"SetBSON",
"(",
"raw",
"bson",
".",
"Raw",
")",
"error",
"{",
"var",
"m",
"bson",
".",
"M",
"\n",
"if",
"err",
":=",
"raw",
".",
"Unmarshal",
"(",
"&",
"m",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"e... |
9,129 | all-9130 | [
"StringPolicy",
"converts",
"a",
"string",
"into",
"a",
"VMware",
"StringPolicy",
"value",
"."
] | [
"func",
"StringPolicy",
"(",
"s",
"string",
")",
"*",
"types",
".",
"StringPolicy",
"{",
"sp",
":=",
"&",
"<mask>",
".",
"StringPolicy",
"{",
"Value",
":",
"s",
",",
"}",
"\n",
"return",
"sp",
"\n",
"}"
] |
9,130 | all-9131 | [
"newPRSignedBaseLayer",
"is",
"NewPRSignedBaseLayer",
"except",
"it",
"returns",
"the",
"private",
"type",
"."
] | [
"func",
"newPRSignedBaseLayer",
"(",
"baseLayerIdentity",
"PolicyReferenceMatch",
")",
"(",
"*",
"prSignedBaseLayer",
",",
"error",
")",
"{",
"if",
"baseLayerIdentity",
"==",
"nil",
"{",
"return",
"nil",
",",
"InvalidPolicyFormatError",
"(",
"\"",
"\"",
")",
"\n",... |
9,131 | all-9132 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"EventLoadingFinished",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"<mask>",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork53",
"(",
"&"... |
9,132 | all-9133 | [
"DeviceToUser",
"is",
"a",
"wrapper",
"around",
"cairo_device_to_user",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"DeviceToUser",
"(",
"x",
",",
"y",
"float64",
")",
"(",
"float64",
",",
"float64",
")",
"{",
"C",
".",
"cairo_device_to_user",
"(",
"v",
".",
"native",
"(",
")",
",",
"(",
"*",
"C",
".",
"double",
")",
"(",
... |
9,133 | all-9134 | [
"Transaction",
"groups",
"the",
"creation",
"of",
"a",
"new",
"TransactionBuilder",
"with",
"a",
"call",
"to",
"Mutate",
"."
] | [
"func",
"<mask>",
"(",
"muts",
"...",
"TransactionMutator",
")",
"(",
"result",
"*",
"TransactionBuilder",
")",
"{",
"result",
"=",
"&",
"TransactionBuilder",
"{",
"}",
"\n",
"result",
".",
"Mutate",
"(",
"muts",
"...",
")",
"\n",
"result",
".",
"Mutate",
... |
9,134 | all-9135 | [
"We",
"start",
"by",
"dealing",
"with",
"each",
"of",
"the",
"primitive",
"types",
"in",
"turn",
".",
"BOOLEAN"
] | [
"func",
"parseBool",
"(",
"bytes",
"[",
"]",
"byte",
")",
"(",
"ret",
"bool",
",",
"err",
"error",
")",
"{",
"if",
"len",
"(",
"<mask>",
")",
"!=",
"1",
"{",
"err",
"=",
"asn1",
".",
"SyntaxError",
"{",
"Msg",
":",
"\"",
"\"",
"}",
"\n",
"retur... |
9,135 | all-9136 | [
"WriteMatrix",
"writes",
"a",
"visual",
"representation",
"of",
"the",
"given",
"matrix",
"for",
"the",
"given",
"strings",
"to",
"the",
"given",
"writer",
"."
] | [
"func",
"WriteMatrix",
"(",
"source",
"[",
"]",
"rune",
",",
"target",
"[",
"]",
"rune",
",",
"matrix",
"[",
"]",
"[",
"]",
"int",
",",
"writer",
"io",
".",
"Writer",
")",
"{",
"fmt",
".",
"Fprintf",
"(",
"writer",
",",
"\"",
"\"",
")",
"\n",
"... |
9,136 | all-9137 | [
"SubscribeCommit",
"is",
"like",
"ListCommit",
"but",
"it",
"keeps",
"listening",
"for",
"commits",
"as",
"they",
"come",
"in",
"."
] | [
"func",
"(",
"c",
"APIClient",
")",
"SubscribeCommit",
"(",
"repo",
"string",
",",
"branch",
"string",
",",
"from",
"string",
",",
"state",
"pfs",
".",
"CommitState",
")",
"(",
"CommitInfoIterator",
",",
"error",
")",
"{",
"ctx",
",",
"cancel",
":=",
"co... |
9,137 | all-9138 | [
"MarshalEasyJSON",
"writes",
"the",
"UUID3",
"to",
"a",
"easyjson",
".",
"Writer"
] | [
"func",
"(",
"u",
"UUID3",
")",
"MarshalEasyJSON",
"(",
"w",
"*",
"jwriter",
".",
"Writer",
")",
"{",
"w",
".",
"<mask>",
"(",
"string",
"(",
"u",
")",
")",
"\n",
"}"
] |
9,138 | all-9139 | [
"prune",
"removes",
"any",
"cached",
"file",
"changes",
"that",
"were",
"not",
"used",
"since",
"the",
"last",
"prune",
"."
] | [
"func",
"(",
"c",
"*",
"changedFilesAgent",
")",
"prune",
"(",
")",
"{",
"c",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"changeCache",
"=",
"c",
".",
"nextChangeCache",
"\n",
"c",
".",
"nextChangeCache",
"=... |
9,139 | all-9140 | [
"PostsubmitToJobSpec",
"generates",
"a",
"downwardapi",
".",
"JobSpec",
"out",
"of",
"a",
"Postsubmit",
".",
"Useful",
"for",
"figuring",
"out",
"GCS",
"paths",
"when",
"parsing",
"jobs",
"out",
"of",
"a",
"prow",
"config",
"."
] | [
"func",
"PostsubmitToJobSpec",
"(",
"<mask>",
"config",
".",
"Postsubmit",
")",
"*",
"downwardapi",
".",
"JobSpec",
"{",
"return",
"&",
"downwardapi",
".",
"JobSpec",
"{",
"Type",
":",
"prowapi",
".",
"PostsubmitJob",
",",
"Job",
":",
"post",
".",
"Name",
... |
9,140 | all-9141 | [
"createBridgeNetworkConfigWithIPAM",
"creates",
"the",
"config",
"of",
"bridge",
"for",
"ADD",
"command",
"where",
"bridge",
"plugin",
"acquires",
"the",
"IP",
"and",
"route",
"information",
"from",
"IPAM"
] | [
"func",
"(",
"client",
"*",
"cniClient",
")",
"createBridgeNetworkConfigWithIPAM",
"(",
"cfg",
"*",
"Config",
")",
"(",
"string",
",",
"*",
"libcni",
".",
"NetworkConfig",
",",
"error",
")",
"{",
"// Create the bridge config first",
"bridgeConfig",
":=",
"client",... |
9,141 | all-9142 | [
"pipelineMeta",
"builds",
"the",
"pipeline",
"metadata",
"from",
"prow",
"job",
"definition"
] | [
"func",
"pipelineMeta",
"(",
"pj",
"prowjobv1",
".",
"ProwJob",
")",
"metav1",
".",
"ObjectMeta",
"{",
"labels",
",",
"annotations",
":=",
"decorate",
".",
"LabelsAndAnnotationsForJob",
"(",
"pj",
")",
"\n",
"return",
"metav1",
".",
"ObjectMeta",
"{",
"Annotat... |
9,142 | all-9143 | [
"FakeNewCollectionDialer",
"-"
] | [
"func",
"FakeNewCollectionDialer",
"(",
"c",
"taskmanager",
".",
"<mask>",
")",
"func",
"(",
"url",
",",
"dbname",
",",
"collectionname",
"string",
")",
"(",
"col",
"integrations",
".",
"Collection",
",",
"err",
"error",
")",
"{",
"return",
"func",
"(",
"u... |
9,143 | all-9144 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"GetFlattenedDocumentReturns",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom42",
"(",
... |
9,144 | all-9145 | [
"Body",
"returns",
"the",
"body",
"text",
"of",
"the",
"github",
"issue",
"and",
"*",
"must",
"*",
"contain",
"the",
"output",
"of",
"ID",
"()",
".",
"closedIssues",
"is",
"a",
"(",
"potentially",
"empty",
")",
"slice",
"containing",
"all",
"closed",
"is... | [
"func",
"(",
"fj",
"*",
"FlakyJob",
")",
"Body",
"(",
"closedIssues",
"[",
"]",
"*",
"githubapi",
".",
"Issue",
")",
"string",
"{",
"// First check that the most recently closed issue (if any exist) was closed",
"// at least a week ago (since that is the sliding window size use... |
9,145 | all-9146 | [
"RemoveSnapshot",
"deletes",
"all",
"saved",
"states",
"for",
"the",
"snapshot",
".",
"Parameters",
":",
"snapshot",
":",
"A",
"Snapshot",
"instance",
".",
"Call",
"VM",
".",
"RootSnapshot",
"()",
"to",
"get",
"a",
"snapshot",
"instance",
".",
"Remarks",
":"... | [
"func",
"(",
"v",
"*",
"VM",
")",
"RemoveSnapshot",
"(",
"snapshot",
"*",
"Snapshot",
",",
"options",
"RemoveSnapshotOption",
")",
"error",
"{",
"<mask>",
"jobHandle",
"C",
".",
"VixHandle",
"=",
"C",
".",
"VIX_INVALID_HANDLE",
"\n",
"var",
"err",
"C",
"."... |
9,146 | all-9147 | [
"Start",
"starts",
"the",
"app",
"calling",
"the",
"provisioner",
".",
"Start",
"method",
"and",
"changing",
"the",
"units",
"state",
"to",
"StatusStarted",
"."
] | [
"func",
"(",
"app",
"*",
"App",
")",
"Start",
"(",
"w",
"io",
".",
"Writer",
",",
"process",
"string",
")",
"error",
"{",
"w",
"=",
"app",
".",
"withLogWriter",
"(",
"w",
")",
"\n",
"msg",
":=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\\n",
"\"",
",... |
9,147 | all-9148 | [
"Get",
"returns",
"an",
"interface",
"value",
"for",
"a",
"specific",
"column",
"."
] | [
"func",
"(",
"r",
"Record",
")",
"Get",
"(",
"column",
"string",
")",
"(",
"interface",
"{",
"}",
",",
"error",
")",
"{",
"v",
",",
"<mask>",
":=",
"r",
"[",
"column",
"]",
"\n",
"if",
"!",
"ok",
"{",
"return",
"nil",
",",
"ErrUnknownColumn",
"\n... |
9,148 | all-9149 | [
"GroupHas",
"reports",
"whether",
"the",
"group",
"has",
"all",
"given",
"permissions",
"."
] | [
"func",
"(",
"i",
"*",
"info",
")",
"GroupHas",
"(",
"p",
"...",
"perm",
")",
"bool",
"{",
"mode",
":=",
"i",
".",
"fi",
".",
"Mode",
"(",
")",
"\n\n",
"for",
"_",
",",
"v",
":=",
"range",
"p",
"{",
"switch",
"v",
"{",
"case",
"R",
":",
"if... |
9,149 | all-9150 | [
"SetNodeName",
"sets",
"node",
"name",
"for",
"a",
"node",
"with",
"given",
"id",
".",
"See",
":",
"https",
":",
"//",
"chromedevtools",
".",
"github",
".",
"io",
"/",
"devtools",
"-",
"protocol",
"/",
"tot",
"/",
"DOM#method",
"-",
"setNodeName",
"param... | [
"func",
"SetNodeName",
"(",
"nodeID",
"cdp",
".",
"NodeID",
",",
"name",
"string",
")",
"*",
"SetNodeNameParams",
"{",
"return",
"&",
"SetNodeNameParams",
"{",
"NodeID",
":",
"nodeID",
",",
"Name",
":",
"<mask>",
",",
"}",
"\n",
"}"
] |
9,150 | all-9151 | [
"UnmarshalJSON",
"satisfies",
"json",
".",
"Unmarshaler",
"."
] | [
"func",
"(",
"t",
"*",
"TransferMode",
")",
"UnmarshalJSON",
"(",
"buf",
"[",
"]",
"<mask>",
")",
"error",
"{",
"return",
"easyjson",
".",
"Unmarshal",
"(",
"buf",
",",
"t",
")",
"\n",
"}"
] |
9,151 | all-9152 | [
"ValidatePassword",
"checks",
"if",
"a",
"given",
"password",
"hash",
"and",
"salt",
"are",
"matching",
"."
] | [
"func",
"ValidatePassword",
"(",
"hash",
"Base64String",
",",
"password",
",",
"salt",
"string",
")",
"error",
"{",
"salted",
":=",
"[",
"]",
"byte",
"(",
"fmt",
".",
"Sprint",
"(",
"<mask>",
",",
"salt",
")",
")",
"\n",
"hashB",
",",
"err",
":=",
"T... |
9,152 | all-9153 | [
"ParseSource",
"parses",
"the",
"source",
"and",
"returns",
"the",
"result",
"."
] | [
"func",
"ParseSource",
"(",
"src",
"*",
"source",
",",
"opts",
"*",
"Options",
")",
"(",
"*",
"result",
",",
"error",
")",
"{",
"// Initialize the options.",
"opts",
"=",
"InitializeOptions",
"(",
"opts",
")",
"\n\n",
"rslt",
":=",
"newResult",
"(",
"nil",... |
9,153 | all-9154 | [
"UnmarshalYAML",
"implements",
"the",
"yaml",
".",
"Unmarshaler",
"interface",
"."
] | [
"func",
"(",
"c",
"*",
"NamespaceDiscovery",
")",
"UnmarshalYAML",
"(",
"unmarshal",
"func",
"(",
"<mask>",
"{",
"}",
")",
"error",
")",
"error",
"{",
"*",
"c",
"=",
"NamespaceDiscovery",
"{",
"}",
"\n",
"type",
"plain",
"NamespaceDiscovery",
"\n",
"return... |
9,154 | all-9155 | [
"ArchiveBuildCmds",
"build",
"a",
"image",
"using",
"the",
"archive",
"method",
"."
] | [
"func",
"ArchiveBuildCmds",
"(",
"app",
"provision",
".",
"App",
",",
"archiveURL",
"<mask>",
")",
"[",
"]",
"string",
"{",
"return",
"buildCmds",
"(",
"app",
",",
"\"",
"\"",
",",
"\"",
"\"",
",",
"archiveURL",
")",
"\n",
"}"
] |
9,155 | all-9156 | [
"NewClient",
"returns",
"a",
"new",
"OpenGDPR",
"client",
"."
] | [
"func",
"NewClient",
"(",
"opts",
"*",
"ClientOptions",
")",
"*",
"Client",
"{",
"cli",
":=",
"opts",
".",
"Client",
"\n",
"if",
"cli",
"==",
"nil",
"{",
"cli",
"=",
"<mask>",
".",
"DefaultClient",
"\n",
"}",
"\n",
"client",
":=",
"&",
"Client",
"{",... |
9,156 | all-9157 | [
"Do",
"executes",
"Animation",
".",
"setPaused",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"SetPausedParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"<mask>",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandSetPaused",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
9,157 | all-9158 | [
"Read",
"function",
"reads",
"configurations",
"from",
"the",
"file",
"defined",
"in",
"Config",
".",
"filename",
"."
] | [
"func",
"(",
"c",
"*",
"Config",
")",
"Read",
"(",
")",
"error",
"{",
"in",
",",
"err",
":=",
"os",
".",
"Open",
"(",
"c",
".",
"filename",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"defer",
"<mask>",
".",
"C... |
9,158 | all-9159 | [
"NewDiscovery",
"returns",
"a",
"new",
"AzureDiscovery",
"which",
"periodically",
"refreshes",
"its",
"targets",
"."
] | [
"func",
"NewDiscovery",
"(",
"cfg",
"*",
"SDConfig",
",",
"logger",
"log",
".",
"Logger",
")",
"*",
"Discovery",
"{",
"if",
"logger",
"==",
"nil",
"{",
"logger",
"=",
"log",
".",
"NewNopLogger",
"(",
")",
"\n",
"}",
"\n",
"d",
":=",
"&",
"Discovery",... |
9,159 | all-9160 | [
"GetLSBRelease",
"returns",
"a",
"map",
"with",
"Linux",
"distribution",
"information"
] | [
"func",
"GetLSBRelease",
"(",
")",
"(",
"map",
"[",
"string",
"]",
"string",
",",
"error",
")",
"{",
"osRelease",
",",
"err",
":=",
"getLSBRelease",
"(",
"\"",
"\"",
")",
"\n",
"if",
"<mask>",
".",
"IsNotExist",
"(",
"err",
")",
"{",
"return",
"getLS... |
9,160 | all-9161 | [
"GetType",
"returns",
"the",
"Type",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"i",
"*",
"IntegrationGCPCreateRequest",
")",
"GetType",
"(",
")",
"string",
"{",
"if",
"i",
"==",
"nil",
"||",
"i",
".",
"<mask>",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"i",
".",
"Type",
"\n",
"}"
] |
9,161 | all-9162 | [
"CreateStatus",
"adds",
"a",
"status",
"context",
"to",
"a",
"commit",
"."
] | [
"func",
"(",
"f",
"*",
"FakeClient",
")",
"CreateStatus",
"(",
"owner",
",",
"repo",
",",
"SHA",
"string",
",",
"s",
"github",
".",
"Status",
")",
"error",
"{",
"if",
"f",
".",
"CreatedStatuses",
"==",
"nil",
"{",
"f",
".",
"CreatedStatuses",
"=",
"m... |
9,162 | all-9163 | [
"Verify",
"parses",
"unverifiedSignature",
"and",
"returns",
"the",
"content",
"and",
"the",
"signer",
"s",
"identity"
] | [
"func",
"(",
"m",
"*",
"openpgpSigningMechanism",
")",
"Verify",
"(",
"unverifiedSignature",
"[",
"]",
"byte",
")",
"(",
"contents",
"[",
"]",
"byte",
",",
"keyIdentity",
"string",
",",
"err",
"error",
")",
"{",
"md",
",",
"err",
":=",
"openpgp",
".",
... |
9,163 | all-9164 | [
"NewLongThen",
"creates",
"a",
"new",
"long",
"running",
"Then",
"comand",
"."
] | [
"func",
"NewLongThen",
"(",
"command",
"string",
",",
"args",
"...",
"string",
")",
"Then",
"{",
"return",
"&",
"gitCmd",
"{",
"<mask>",
":",
"command",
",",
"args",
":",
"args",
",",
"background",
":",
"true",
",",
"haltChan",
":",
"make",
"(",
"chan"... |
9,164 | all-9165 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"GetDatabaseTableNamesParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase1",
"(",
"&",
"w",
",",
... |
9,165 | all-9166 | [
"ParseReference",
"converts",
"a",
"string",
"which",
"should",
"not",
"start",
"with",
"the",
"ImageTransport",
".",
"Name",
"prefix",
"into",
"an",
"Docker",
"ImageReference",
"."
] | [
"func",
"ParseReference",
"(",
"refString",
"string",
")",
"(",
"types",
".",
"ImageReference",
",",
"error",
")",
"{",
"if",
"!",
"strings",
".",
"HasPrefix",
"(",
"refString",
",",
"\"",
"\"",
")",
"{",
"return",
"nil",
",",
"errors",
".",
"Errorf",
... |
9,166 | all-9167 | [
"ReorderChild",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_box_reorder_child",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Box",
")",
"ReorderChild",
"(",
"child",
"IWidget",
",",
"position",
"int",
")",
"{",
"C",
".",
"gtk_box_reorder_child",
"(",
"v",
".",
"native",
"(",
")",
",",
"<mask>",
".",
"toWidget",
"(",
")",
",",
"C",
".",
"gint",
"("... |
9,167 | all-9168 | [
"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",
"."
] | [
"func",
"edges1",
"(",
"p",
"*",
"Process",
",",
"r",
"*",
"Root",
",",
"off",
"int64",
",",
"t",
"*",
"Type",
",",
"fn",
"func",
"(",
"int64",
",",
"Object",
",",
"int64",
")",
"bool",
")",
"bool",
"{",
"switch",
"t",
".",
"Kind",
"{",
"case",... |
9,168 | all-9169 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"Event",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice6",
"(",
"&",
"w",
",",
"v",
")",
... |
9,169 | all-9170 | [
"ListAll",
"populates",
"a",
"set",
"will",
"all",
"available",
"NATGateway",
"resources",
"."
] | [
"func",
"(",
"NATGateway",
")",
"ListAll",
"(",
"sess",
"*",
"session",
".",
"Session",
",",
"acct",
",",
"region",
"string",
")",
"(",
"*",
"Set",
",",
"error",
")",
"{",
"svc",
":=",
"ec2",
".",
"New",
"(",
"sess",
",",
"&",
"aws",
".",
"Config... |
9,170 | all-9171 | [
"title",
":",
"move",
"container",
"path",
":",
"/",
"docker",
"/",
"container",
"/",
"{",
"id",
"}",
"/",
"move",
"method",
":",
"POST",
"consume",
":",
"application",
"/",
"x",
"-",
"www",
"-",
"form",
"-",
"urlencoded",
"produce",
":",
"application"... | [
"func",
"moveContainerHandler",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"t",
"auth",
".",
"Token",
")",
"(",
"err",
"error",
")",
"{",
"params",
":=",
"map",
"[",
"string",
"]",
"string",
"{",
"}",
"\n",
... |
9,171 | all-9172 | [
"DeepCopy",
"is",
"an",
"autogenerated",
"deepcopy",
"function",
"copying",
"the",
"receiver",
"creating",
"a",
"new",
"DNSEndpointList",
"."
] | [
"func",
"(",
"in",
"*",
"DNSEndpointList",
")",
"DeepCopy",
"(",
")",
"*",
"DNSEndpointList",
"{",
"if",
"in",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"out",
":=",
"new",
"(",
"DNSEndpointList",
")",
"\n",
"<mask>",
".",
"DeepCopyInto",
"("... |
9,172 | all-9173 | [
"Read",
"fetches",
"and",
"decodes",
"K8s",
"objects",
"by",
"path",
".",
"TODO",
":",
"Replace",
"this",
"with",
"something",
"supporting",
"more",
"sophisticated",
"content",
"negotiation",
"."
] | [
"func",
"Read",
"(",
"vm",
"*",
"jsonnet",
".",
"VM",
",",
"path",
"string",
")",
"(",
"[",
"]",
"runtime",
".",
"Object",
",",
"error",
")",
"{",
"ext",
":=",
"filepath",
".",
"Ext",
"(",
"path",
")",
"\n",
"if",
"ext",
"==",
"\"",
"\"",
"{",
... |
9,173 | all-9174 | [
"DeleteRuleSet",
"deletes",
"passed",
"rule",
"set",
"."
] | [
"func",
"(",
"a",
"*",
"API",
")",
"DeleteRuleSet",
"(",
"cfg",
"*",
"RuleSet",
")",
"(",
"bool",
",",
"error",
")",
"{",
"if",
"cfg",
"==",
"nil",
"{",
"return",
"<mask>",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"retu... |
9,174 | all-9175 | [
"Print",
"outputs",
"Print",
"log"
] | [
"func",
"(",
"g",
"*",
"Glg",
")",
"Print",
"(",
"val",
"...",
"interface",
"{",
"}",
")",
"error",
"{",
"return",
"g",
".",
"<mask>",
"(",
"PRINT",
",",
"blankFormat",
"(",
"len",
"(",
"val",
")",
")",
",",
"val",
"...",
")",
"\n",
"}"
] |
9,175 | all-9176 | [
"Error",
"returns",
"the",
"string",
"representation",
"of",
"a",
"Bambou",
"Error",
"(",
"making",
"it",
"an",
"error",
")",
"Valid",
"JSON",
"formatted"
] | [
"func",
"(",
"be",
"*",
"Error",
")",
"<mask>",
"(",
")",
"string",
"{",
"// return fmt.Sprintf(\"%+v\", *be)",
"return",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\\\"",
"\\\"",
"\\\"",
"\\\"",
"\\\"",
"\\\"",
"\\\"",
"\\\"",
"\"",
",",
"be",
".",
"Title",
","... |
9,176 | all-9177 | [
"Tag",
"gets",
"the",
"tag",
"value",
"for",
"a",
"specified",
"key",
"."
] | [
"func",
"(",
"s",
"*",
"DeploymentManifest",
")",
"Tag",
"(",
"<mask>",
"string",
")",
"string",
"{",
"if",
"s",
".",
"Tags",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"s",
".",
"Tags",
"[",
"key",
"]",
"\n",
"}"
] |
9,177 | all-9178 | [
"Get",
"returns",
"the",
"status",
"code",
"and",
"body",
"of",
"url",
".",
"The",
"contents",
"of",
"dst",
"will",
"be",
"replaced",
"by",
"the",
"body",
"and",
"returned",
"if",
"the",
"dst",
"is",
"too",
"small",
"a",
"new",
"slice",
"will",
"be",
... | [
"func",
"Get",
"(",
"dst",
"[",
"]",
"byte",
",",
"url",
"string",
")",
"(",
"statusCode",
"int",
",",
"body",
"[",
"]",
"<mask>",
",",
"err",
"error",
")",
"{",
"return",
"defaultClient",
".",
"Get",
"(",
"dst",
",",
"url",
")",
"\n",
"}"
] |
9,178 | all-9179 | [
"SetExecutionStoppedAt",
"sets",
"the",
"ExecutionStoppedAt",
"timestamp",
"of",
"the",
"task"
] | [
"func",
"(",
"<mask>",
"*",
"Task",
")",
"SetExecutionStoppedAt",
"(",
"timestamp",
"time",
".",
"Time",
")",
"bool",
"{",
"task",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"task",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n\n",
"if",
"task",
... |
9,179 | all-9180 | [
"Token",
"is",
"an",
"implementation",
"for",
"oauth2",
".",
"TokenSource",
"interface",
"."
] | [
"func",
"(",
"s",
"*",
"reloadingTokenSource",
")",
"Token",
"(",
")",
"(",
"*",
"oauth2",
".",
"Token",
",",
"error",
")",
"{",
"return",
"&",
"oauth2",
".",
"<mask>",
"{",
"AccessToken",
":",
"string",
"(",
"s",
".",
"getToken",
"(",
")",
")",
",... |
9,180 | all-9181 | [
"Escape",
"in",
"string",
"to",
"be",
"wrapped",
"in",
"them"
] | [
"func",
"escapeBackticks",
"(",
"d",
"string",
")",
"string",
"{",
"elems",
":=",
"strings",
".",
"Split",
"(",
"d",
",",
"\"",
"\"",
")",
"\n",
"<mask>",
"strings",
".",
"Join",
"(",
"elems",
",",
"\"",
"\"",
")",
"\n",
"}"
] |
9,181 | all-9182 | [
"GetMessage",
"returns",
"the",
"Message",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"h",
"*",
"HostActionMute",
")",
"GetMessage",
"(",
")",
"string",
"{",
"if",
"h",
"==",
"nil",
"||",
"h",
".",
"<mask>",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"h",
".",
"Message",
"\n",
"}"
] |
9,182 | all-9183 | [
"GobValue",
"retrieves",
"a",
"value",
"written",
"by",
"PutGob",
"and",
"decode",
"it",
"."
] | [
"func",
"(",
"b",
"Bucket",
")",
"GobValue",
"(",
"k",
"[",
"]",
"[",
"]",
"byte",
",",
"f",
"func",
"(",
"interface",
"{",
"}",
")",
"error",
")",
"error",
"{",
"return",
"b",
".",
"Value",
"(",
"k",
",",
"func",
"(",
"bs",
"bytesp",
".",
"S... |
9,183 | all-9184 | [
"SendEvents",
"streams",
"events",
"from",
"specified",
"channels",
"as",
"Server",
"Sent",
"Events",
"packets"
] | [
"func",
"SendEvents",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"channels",
"[",
"]",
"string",
")",
"{",
"// make sure that the writer supports flushing",
"flusher",
",",
"ok",
":=",
"w",
".",
"(",
"http",
".",
"... |
9,184 | all-9185 | [
"RemoveAllAuthentication",
"deletes",
"all",
"the",
"credentials",
"stored",
"in",
"auth",
".",
"json"
] | [
"func",
"RemoveAllAuthentication",
"(",
"sys",
"*",
"types",
".",
"SystemContext",
")",
"error",
"{",
"return",
"modifyJSON",
"(",
"sys",
",",
"func",
"(",
"auths",
"*",
"dockerConfigFile",
")",
"(",
"bool",
",",
"error",
")",
"{",
"auths",
".",
"CredHelpe... |
9,185 | all-9186 | [
"Debugln",
"records",
"the",
"log",
"with",
"debug",
"level"
] | [
"func",
"(",
"l",
"*",
"Logger",
")",
"Debugln",
"(",
"args",
"...",
"<mask>",
"{",
"}",
")",
"{",
"l",
".",
"Output",
"(",
"2",
",",
"LevelDebug",
",",
"fmt",
".",
"Sprintln",
"(",
"args",
"...",
")",
")",
"\n",
"}"
] |
9,186 | all-9187 | [
"Delete",
"deletes",
"a",
"blob",
"."
] | [
"func",
"Delete",
"(",
"c",
"context",
".",
"<mask>",
",",
"blobKey",
"appengine",
".",
"BlobKey",
")",
"error",
"{",
"return",
"DeleteMulti",
"(",
"c",
",",
"[",
"]",
"appengine",
".",
"BlobKey",
"{",
"blobKey",
"}",
")",
"\n",
"}"
] |
9,187 | all-9188 | [
"DefaultRulesPath",
"return",
"the",
"default",
"PATH",
"that",
"contains",
"rules",
"."
] | [
"func",
"DefaultRulesPath",
"(",
")",
"string",
"{",
"rulesPath",
":=",
"<mask>",
".",
"Getenv",
"(",
"\"",
"\"",
")",
"\n",
"if",
"rulesPath",
"==",
"\"",
"\"",
"{",
"rulesPath",
"=",
"os",
".",
"ExpandEnv",
"(",
"defaultRulesDir",
")",
"\n",
"}",
"\n... |
9,188 | all-9189 | [
"GetRelatedId",
"returns",
"the",
"RelatedId",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"c",
"*",
"<mask>",
")",
"GetRelatedId",
"(",
")",
"int",
"{",
"if",
"c",
"==",
"nil",
"||",
"c",
".",
"RelatedId",
"==",
"nil",
"{",
"return",
"0",
"\n",
"}",
"\n",
"return",
"*",
"c",
".",
"RelatedId",
"\n",
"}"
] |
9,189 | all-9190 | [
"New",
"function",
"for",
"initialize",
"the",
"service",
"for",
"generating",
"the",
"Endpoint",
"Message",
"."
] | [
"func",
"New",
"(",
"db",
"*",
"reform",
".",
"<mask>",
",",
"logger",
"log",
".",
"Logger",
",",
"payAddr",
"string",
",",
"timeout",
"uint",
")",
"(",
"*",
"Service",
",",
"error",
")",
"{",
"return",
"&",
"Service",
"{",
"db",
":",
"db",
",",
... |
9,190 | all-9191 | [
"PutFile",
"writes",
"a",
"file",
"to",
"PFS",
"from",
"a",
"reader",
"."
] | [
"func",
"(",
"c",
"*",
"putFileClient",
")",
"PutFile",
"(",
"repoName",
"string",
",",
"commitID",
"string",
",",
"<mask>",
"string",
",",
"reader",
"io",
".",
"Reader",
")",
"(",
"_",
"int",
",",
"retErr",
"error",
")",
"{",
"return",
"c",
".",
"Pu... |
9,191 | all-9192 | [
"GetURL",
"returns",
"a",
"server",
"URL",
"for",
"a",
"given",
"path",
"."
] | [
"func",
"GetURL",
"(",
"conf",
"*",
"Config",
",",
"path",
"string",
")",
"string",
"{",
"var",
"proto",
"=",
"\"",
"\"",
"\n",
"if",
"conf",
".",
"TLS",
"!=",
"nil",
"{",
"proto",
"+=",
"\"",
"\"",
"\n",
"}",
"\n\n",
"return",
"proto",
"+",
"\""... |
9,192 | all-9193 | [
"GetDesiredStatus",
"safely",
"returns",
"the",
"desired",
"status",
"of",
"the",
"task"
] | [
"func",
"(",
"secret",
"*",
"ASMSecretResource",
")",
"GetDesiredStatus",
"(",
")",
"resourcestatus",
".",
"ResourceStatus",
"{",
"secret",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"secret",
".",
"<mask>",
".",
"RUnlock",
"(",
")",
"\n\n",
"retu... |
9,193 | all-9194 | [
"GetRegistries",
"returns",
"an",
"array",
"of",
"strings",
"that",
"contain",
"the",
"names",
"of",
"the",
"registries",
"as",
"defined",
"in",
"the",
"system",
"-",
"wide",
"registries",
"file",
".",
"it",
"returns",
"an",
"empty",
"array",
"if",
"none",
... | [
"func",
"GetRegistries",
"(",
"sys",
"*",
"<mask>",
".",
"SystemContext",
")",
"(",
"[",
"]",
"string",
",",
"error",
")",
"{",
"config",
",",
"err",
":=",
"loadRegistryConf",
"(",
"sys",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
","... |
9,194 | all-9195 | [
"GetContainerLogfiles",
"returns",
"a",
"list",
"of",
"logfiles",
"for",
"the",
"container"
] | [
"func",
"(",
"r",
"*",
"ProtocolLXD",
")",
"GetContainerLogfiles",
"(",
"name",
"string",
")",
"(",
"[",
"]",
"string",
",",
"error",
")",
"{",
"urls",
":=",
"[",
"]",
"string",
"{",
"}",
"\n\n",
"// Fetch the raw value",
"_",
",",
"err",
":=",
"r",
... |
9,195 | all-9196 | [
"MatchLabels",
"returns",
"a",
"subset",
"of",
"Labels",
"that",
"matches",
"/",
"does",
"not",
"match",
"with",
"the",
"provided",
"label",
"names",
"based",
"on",
"the",
"on",
"boolean",
".",
"If",
"on",
"is",
"set",
"to",
"true",
"it",
"returns",
"the... | [
"func",
"(",
"ls",
"Labels",
")",
"MatchLabels",
"(",
"on",
"bool",
",",
"names",
"...",
"string",
")",
"Labels",
"{",
"matchedLabels",
":=",
"Labels",
"{",
"}",
"\n\n",
"nameSet",
":=",
"map",
"[",
"string",
"]",
"struct",
"{",
"}",
"{",
"}",
"\n",
... |
9,196 | all-9197 | [
"CharAt",
"returns",
"a",
"string",
"from",
"the",
"character",
"at",
"the",
"specified",
"position",
"."
] | [
"func",
"CharAt",
"(",
"s",
"string",
",",
"<mask>",
"int",
")",
"string",
"{",
"l",
":=",
"len",
"(",
"s",
")",
"\n",
"shortcut",
":=",
"index",
"<",
"0",
"||",
"index",
">",
"l",
"-",
"1",
"||",
"l",
"==",
"0",
"\n",
"if",
"shortcut",
"{",
... |
9,197 | all-9198 | [
"Records",
"returns",
"the",
"endpoints",
"this",
"provider",
"knows",
"about"
] | [
"func",
"(",
"p",
"*",
"NS1Provider",
")",
"Records",
"(",
")",
"(",
"[",
"]",
"*",
"endpoint",
".",
"Endpoint",
",",
"error",
")",
"{",
"zones",
",",
"err",
":=",
"p",
".",
"zonesFiltered",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return"... |
9,198 | all-9199 | [
"ServeTCP",
"executes",
"http",
".",
"Server",
".",
"Serve",
"method",
".",
"If",
"the",
"provided",
"listener",
"is",
"net",
".",
"TCPListener",
"keep",
"alive",
"will",
"be",
"enabled",
".",
"If",
"server",
"is",
"configured",
"with",
"TLS",
"a",
"tls",
... | [
"func",
"(",
"s",
"*",
"Server",
")",
"ServeTCP",
"(",
"ln",
"net",
".",
"Listener",
")",
"(",
"err",
"error",
")",
"{",
"if",
"l",
",",
"ok",
":=",
"ln",
".",
"(",
"*",
"net",
".",
"TCPListener",
")",
";",
"ok",
"{",
"ln",
"=",
"tcpKeepAliveLi... |
9,199 | all-9200 | [
"ForeachKey",
"conforms",
"to",
"the",
"TextMapReader",
"interface",
"."
] | [
"func",
"(",
"c",
"TextMapCarrier",
")",
"ForeachKey",
"(",
"handler",
"func",
"(",
"key",
",",
"val",
"string",
")",
"error",
")",
"error",
"{",
"for",
"k",
",",
"v",
":=",
"<mask>",
"c",
"{",
"if",
"err",
":=",
"handler",
"(",
"k",
",",
"v",
")... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.