id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
6,600 | all-6601 | [
"GetLiveSpanOk",
"returns",
"a",
"tuple",
"with",
"the",
"LiveSpan",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"w",
"*",
"WidgetTime",
")",
"GetLiveSpanOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"w",
"==",
"nil",
"||",
"w",
".",
"LiveSpan",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"<mask>",
"\n",
"}",
"\n",
"return",
"*",
... |
6,601 | all-6602 | [
"timeoutAndMoveOn",
"executes",
"the",
"long",
"running",
"function",
"pointed",
"to",
"by",
"fp",
"and",
"times",
"out",
"after",
"timeout",
"duration",
"."
] | [
"func",
"timeoutAndMoveOn",
"(",
"fp",
"loiterFunc",
",",
"timeout",
"<mask>",
".",
"Duration",
")",
"{",
"ch",
":=",
"time",
".",
"After",
"(",
"timeout",
")",
"\n",
"for",
"{",
"select",
"{",
"case",
"<-",
"ch",
":",
"return",
"\n",
"default",
":",
... |
6,602 | all-6603 | [
"-----------------",
"own",
"methods",
"-------------------------",
"SetValue",
"sets",
"new",
"progress",
"value",
".",
"If",
"value",
"exceeds",
"ProgressBar",
"limits",
"then",
"the",
"limit",
"value",
"is",
"used"
] | [
"func",
"(",
"b",
"*",
"ProgressBar",
")",
"SetValue",
"(",
"pos",
"int",
")",
"{",
"b",
".",
"mtx",
".",
"Lock",
"(",
")",
"\n",
"defer",
"b",
".",
"mtx",
".",
"Unlock",
"(",
")",
"\n",
"if",
"pos",
"<",
"b",
".",
"min",
"{",
"b",
".",
"va... |
6,603 | all-6604 | [
"mustSanityCheck",
"is",
"like",
"sanityCheck",
"but",
"panics",
"instead",
"of",
"returning",
"a",
"negative",
"result",
"."
] | [
"func",
"mustSanityCheck",
"(",
"fn",
"*",
"Function",
",",
"reporter",
"<mask>",
".",
"Writer",
")",
"{",
"if",
"!",
"sanityCheck",
"(",
"fn",
",",
"reporter",
")",
"{",
"fn",
".",
"WriteTo",
"(",
"os",
".",
"Stderr",
")",
"\n",
"panic",
"(",
"\"",
... |
6,604 | all-6605 | [
"RunForDashWebSocket",
"creates",
"a",
"port",
"forwarder",
"for",
"the",
"dash",
"websocket",
"."
] | [
"func",
"(",
"f",
"*",
"PortForwarder",
")",
"RunForDashWebSocket",
"(",
"localPort",
"uint16",
")",
"<mask>",
"{",
"if",
"localPort",
"==",
"0",
"{",
"localPort",
"=",
"dashWebSocketLocalPort",
"\n",
"}",
"\n",
"return",
"f",
".",
"Run",
"(",
"\"",
"\"",
... |
6,605 | all-6606 | [
"CreateArticle",
"persists",
"the",
"posted",
"Article",
"and",
"returns",
"it",
"back",
"to",
"the",
"client",
"as",
"an",
"acknowledgement",
"."
] | [
"func",
"CreateArticle",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
")",
"{",
"<mask>",
":=",
"&",
"ArticleRequest",
"{",
"}",
"\n",
"if",
"err",
":=",
"render",
".",
"Bind",
"(",
"r",
",",
"data",
")",
";",
"er... |
6,606 | all-6607 | [
"FindOrg",
"-"
] | [
"func",
"(",
"m",
"*",
"DefaultManager",
")",
"FindOrg",
"(",
"orgName",
"string",
")",
"(",
"cfclient",
".",
"Org",
",",
"error",
")",
"{",
"orgs",
",",
"err",
":=",
"m",
".",
"ListOrgs",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
... |
6,607 | all-6608 | [
"Start",
"starts",
"the",
"session",
".",
"It",
"ll",
"forever",
"keep",
"trying",
"to",
"connect",
"to",
"ACS",
"unless",
"the",
"context",
"is",
"cancelled",
".",
"If",
"the",
"context",
"is",
"cancelled",
"Start",
"()",
"would",
"return",
"with",
"the",... | [
"func",
"(",
"acsSession",
"*",
"session",
")",
"Start",
"(",
")",
"error",
"{",
"// connectToACS channel is used to indicate the intent to connect to ACS",
"// It's processed by the select loop to connect to ACS",
"connectToACS",
":=",
"make",
"(",
"chan",
"struct",
"{",
"}"... |
6,608 | all-6609 | [
"Increment",
"the",
"counter",
"by",
"one",
"."
] | [
"func",
"(",
"p",
"*",
"peer",
")",
"incr",
"(",
")",
"(",
"result",
"int",
")",
"{",
"c",
":=",
"make",
"(",
"chan",
"struct",
"{",
"}",
")",
"\n",
"p",
".",
"actions",
"<-",
"func",
"(",
")",
"{",
"defer",
"close",
"(",
"c",
")",
"\n",
"s... |
6,609 | all-6610 | [
"Return",
"timeout",
"in",
"seconds"
] | [
"func",
"samlRequestTimeout",
"(",
"schemeData",
"<mask>",
"[",
"string",
"]",
"string",
")",
"int",
"{",
"p",
":=",
"schemeData",
"[",
"\"",
"\"",
"]",
"\n",
"timeout",
",",
"_",
":=",
"strconv",
".",
"Atoi",
"(",
"p",
")",
"\n",
"return",
"timeout",
... |
6,610 | all-6611 | [
"readJSONFile",
"unmarshals",
"the",
"authentications",
"stored",
"in",
"the",
"auth",
".",
"json",
"file",
"and",
"returns",
"it",
"or",
"returns",
"an",
"empty",
"dockerConfigFile",
"data",
"structure",
"if",
"auth",
".",
"json",
"does",
"not",
"exist",
"if"... | [
"func",
"readJSONFile",
"(",
"path",
"string",
",",
"legacyFormat",
"bool",
")",
"(",
"dockerConfigFile",
",",
"error",
")",
"{",
"var",
"auths",
"dockerConfigFile",
"\n\n",
"raw",
",",
"err",
":=",
"ioutil",
".",
"ReadFile",
"(",
"<mask>",
")",
"\n",
"if"... |
6,611 | all-6612 | [
"Value",
"returns",
"the",
"value",
"associated",
"with",
"the",
"iterator",
"."
] | [
"func",
"(",
"s",
"*",
"MergeIterator",
")",
"<mask>",
"(",
")",
"ValueStruct",
"{",
"if",
"len",
"(",
"s",
".",
"h",
")",
"==",
"0",
"{",
"return",
"ValueStruct",
"{",
"}",
"\n",
"}",
"\n",
"return",
"s",
".",
"h",
"[",
"0",
"]",
".",
"itr",
... |
6,612 | all-6613 | [
"HTML",
"renders",
"the",
"HTML",
"with",
"default",
"template",
"set",
"."
] | [
"func",
"(",
"ctx",
"*",
"Context",
")",
"HTML",
"(",
"status",
"int",
",",
"name",
"string",
",",
"data",
"...",
"<mask>",
"{",
"}",
")",
"{",
"ctx",
".",
"renderHTML",
"(",
"status",
",",
"DEFAULT_TPL_SET_NAME",
",",
"name",
",",
"data",
"...",
")"... |
6,613 | all-6614 | [
"URLFormat",
"is",
"a",
"middleware",
"that",
"parses",
"the",
"url",
"extension",
"from",
"a",
"request",
"path",
"and",
"stores",
"it",
"on",
"the",
"context",
"as",
"a",
"string",
"under",
"the",
"key",
"middleware",
".",
"URLFormatCtxKey",
".",
"The",
... | [
"func",
"URLFormat",
"(",
"next",
"http",
".",
"Handler",
")",
"http",
".",
"Handler",
"{",
"fn",
":=",
"func",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
")",
"{",
"ctx",
":=",
"r",
".",
"Context",
"(",
")",
... |
6,614 | all-6615 | [
"SetBorderWidth",
"is",
"a",
"wrapper",
"around",
"gtk_container_set_border_width",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"SetBorderWidth",
"(",
"borderWidth",
"uint",
")",
"{",
"C",
".",
"gtk_container_set_border_width",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"guint",
"(",
"borderWidth",
")",
")",
"\n",
"}"
] |
6,615 | all-6616 | [
"GetIconName",
"is",
"a",
"wrapper",
"around",
"gtk_window_get_icon_name",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Window",
")",
"GetIconName",
"(",
")",
"(",
"string",
",",
"error",
")",
"{",
"<mask>",
"stringReturn",
"(",
"C",
".",
"gtk_window_get_icon_name",
"(",
"v",
".",
"native",
"(",
")",
")",
")",
"\n",
"}"
] |
6,616 | all-6617 | [
"listen",
"listens",
"to",
"the",
"event",
"channel"
] | [
"func",
"(",
"eventStream",
"*",
"EventStream",
")",
"listen",
"(",
")",
"{",
"seelog",
".",
"Infof",
"(",
"\"",
"\"",
",",
"eventStream",
".",
"name",
")",
"\n",
"for",
"{",
"select",
"{",
"case",
"event",
":=",
"<-",
"eventStream",
".",
"event",
":... |
6,617 | all-6618 | [
"GetX",
"returns",
"the",
"X",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"w",
"*",
"WidgetLayout",
")",
"GetX",
"(",
")",
"float64",
"{",
"if",
"w",
"==",
"nil",
"||",
"w",
".",
"X",
"==",
"nil",
"{",
"<mask>",
"0",
"\n",
"}",
"\n",
"return",
"*",
"w",
".",
"X",
"\n",
"}"
] |
6,618 | all-6619 | [
"delete",
"named",
"query",
"objects"
] | [
"func",
"DeleteQueries",
"(",
"n",
"int32",
",",
"ids",
"*",
"uint32",
")",
"{",
"syscall",
".",
"Syscall",
"(",
"gpDeleteQueries",
",",
"2",
",",
"uintptr",
"(",
"n",
")",
",",
"uintptr",
"(",
"unsafe",
".",
"Pointer",
"(",
"<mask>",
")",
")",
",",
... |
6,619 | all-6620 | [
"WithURL",
"if",
"set",
"the",
"request",
"url",
"will",
"be",
"modified",
"in",
"a",
"way",
"that",
"s",
"not",
"observable",
"by",
"page",
"."
] | [
"func",
"(",
"p",
"ContinueRequestParams",
")",
"WithURL",
"(",
"<mask>",
"string",
")",
"*",
"ContinueRequestParams",
"{",
"p",
".",
"URL",
"=",
"url",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
6,620 | all-6621 | [
"Execute",
"checks",
"if",
"the",
"provided",
"certificate",
"has",
"embedded",
"SCTs",
"from",
"a",
"sufficient",
"number",
"of",
"unique",
"CT",
"logs",
"to",
"meet",
"Apple",
"s",
"CT",
"log",
"policy",
"[",
"0",
"]",
"effective",
"Oct",
"15th",
"2018",... | [
"func",
"(",
"l",
"*",
"sctPolicyCount",
")",
"Execute",
"(",
"c",
"*",
"x509",
".",
"Certificate",
")",
"*",
"LintResult",
"{",
"// Determine the required number of SCTs from separate logs",
"expected",
":=",
"appleCTPolicyExpectedSCTs",
"(",
"c",
")",
"\n\n",
"// ... |
6,621 | all-6622 | [
"DisconnectAll",
"is",
"used",
"to",
"remove",
"all",
"routes",
"to",
"peers",
"."
] | [
"func",
"(",
"i",
"*",
"InmemTransport",
")",
"DisconnectAll",
"(",
")",
"{",
"i",
".",
"Lock",
"(",
")",
"\n",
"defer",
"i",
".",
"Unlock",
"(",
")",
"\n",
"i",
".",
"peers",
"=",
"make",
"(",
"<mask>",
"[",
"ServerAddress",
"]",
"*",
"InmemTransp... |
6,622 | all-6623 | [
"rmdirCommandFunc",
"executes",
"the",
"rmdir",
"command",
"."
] | [
"func",
"rmdirCommandFunc",
"(",
"c",
"*",
"cli",
".",
"Context",
",",
"ki",
"client",
".",
"KeysAPI",
")",
"{",
"if",
"len",
"(",
"c",
".",
"Args",
"(",
")",
")",
"==",
"0",
"{",
"handleError",
"(",
"c",
",",
"ExitBadArgs",
",",
"errors",
".",
"... |
6,623 | all-6624 | [
"If",
"no",
"limit",
"is",
"given",
"the",
"roleIds",
"of",
"all",
"roles",
"are",
"returned",
".",
"Since",
"this",
"list",
"may",
"become",
"long",
"callers",
"can",
"use",
"the",
"limit",
"and",
"continuationToken",
"query",
"arguments",
"to",
"page",
"... | [
"func",
"(",
"auth",
"*",
"Auth",
")",
"ListRoleIds",
"(",
"continuationToken",
",",
"limit",
"string",
")",
"(",
"*",
"GetRoleIdsResponse",
",",
"error",
")",
"{",
"v",
":=",
"url",
".",
"Values",
"{",
"}",
"\n",
"if",
"continuationToken",
"!=",
"\"",
... |
6,624 | all-6625 | [
"NodeUpdateVersion",
"updates",
"the",
"schema",
"and",
"API",
"version",
"of",
"the",
"node",
"with",
"the",
"given",
"id",
".",
"This",
"is",
"used",
"only",
"in",
"tests",
"."
] | [
"func",
"(",
"c",
"*",
"ClusterTx",
")",
"NodeUpdateVersion",
"(",
"id",
"int64",
",",
"version",
"[",
"2",
"]",
"int",
")",
"error",
"{",
"stmt",
":=",
"\"",
"\"",
"\n\n",
"result",
",",
"err",
":=",
"c",
".",
"tx",
".",
"Exec",
"(",
"stmt",
","... |
6,625 | all-6626 | [
"lintHelp",
"detects",
"issues",
"related",
"to",
"the",
"help",
"text",
"for",
"a",
"metric",
"."
] | [
"func",
"lintHelp",
"(",
"mf",
"dto",
".",
"MetricFamily",
")",
"[",
"]",
"Problem",
"{",
"<mask>",
"problems",
"problems",
"\n\n",
"// Expect all metrics to have help text available.",
"if",
"mf",
".",
"Help",
"==",
"nil",
"{",
"problems",
".",
"Add",
"(",
"m... |
6,626 | all-6627 | [
"safeBase64Scan",
"scans",
"from",
"src",
"(",
"which",
"should",
"be",
"either",
"a",
"[]",
"byte",
"or",
"string",
")",
"into",
"dest",
"by",
"using",
"SafeUnmarshalBase64",
"."
] | [
"func",
"safeBase64Scan",
"(",
"src",
",",
"dest",
"interface",
"{",
"}",
")",
"error",
"{",
"var",
"val",
"string",
"\n",
"switch",
"src",
":=",
"src",
".",
"(",
"<mask>",
")",
"{",
"case",
"[",
"]",
"byte",
":",
"val",
"=",
"string",
"(",
"src",
... |
6,627 | all-6628 | [
"NewPackageLogger",
"wraps",
"*",
"capnslog",
".",
"PackageLogger",
"that",
"implements",
"Logger",
"interface",
".",
"For",
"example",
":",
"var",
"defaultLogger",
"Logger",
"defaultLogger",
"=",
"NewPackageLogger",
"(",
"go",
".",
"etcd",
".",
"io",
"/",
"etcd... | [
"func",
"NewPackageLogger",
"(",
"repo",
",",
"pkg",
"<mask>",
")",
"Logger",
"{",
"return",
"&",
"packageLogger",
"{",
"p",
":",
"capnslog",
".",
"NewPackageLogger",
"(",
"repo",
",",
"pkg",
")",
"}",
"\n",
"}"
] |
6,628 | all-6629 | [
"SplitDatacenter",
"is",
"a",
"convenience",
"method",
"that",
"splits",
"out",
"the",
"datacenter",
"path",
"from",
"the",
"supplied",
"path",
"for",
"the",
"particle",
"."
] | [
"func",
"(",
"p",
"RootPathParticle",
")",
"SplitDatacenter",
"(",
"inventoryPath",
"string",
")",
"(",
"<mask>",
",",
"error",
")",
"{",
"s",
":=",
"strings",
".",
"SplitN",
"(",
"inventoryPath",
",",
"p",
".",
"Delimiter",
"(",
")",
",",
"2",
")",
"\... |
6,629 | all-6630 | [
"IsReady",
"reflects",
"if",
"the",
"check",
"has",
"been",
"initialied",
"and",
"metrics",
"can",
"be",
"sent",
"to",
"Circonus"
] | [
"func",
"(",
"cm",
"*",
"CheckManager",
")",
"IsReady",
"(",
")",
"bool",
"{",
"cm",
".",
"initializedmu",
".",
"RLock",
"(",
")",
"\n",
"defer",
"cm",
".",
"initializedmu",
".",
"RUnlock",
"(",
")",
"\n",
"<mask>",
"cm",
".",
"initialized",
"\n",
"}... |
6,630 | all-6631 | [
"RetryRules",
"returns",
"the",
"correct",
"time",
"to",
"delay",
"between",
"retries",
"for",
"this",
"instance",
"of",
"a",
"retry",
".",
"For",
"the",
"first",
"14",
"requests",
"it",
"follows",
"an",
"exponential",
"backoff",
"between",
"30ms",
"and",
"1... | [
"func",
"(",
"retrier",
"*",
"oneDayRetrier",
")",
"RetryRules",
"(",
"r",
"*",
"request",
".",
"Request",
")",
"time",
".",
"Duration",
"{",
"// This logic is the same as the default retrier, but duplicated here such",
"// that upstream changes do not invalidate the math done ... |
6,631 | all-6632 | [
"Close",
"releases",
"the",
"resources",
"of",
"the",
"Querier",
"."
] | [
"func",
"(",
"q",
"*",
"mergeQuerier",
")",
"Close",
"(",
")",
"error",
"{",
"// TODO return multiple errors?",
"<mask>",
"lastErr",
"error",
"\n",
"for",
"_",
",",
"querier",
":=",
"range",
"q",
".",
"queriers",
"{",
"if",
"err",
":=",
"querier",
".",
"... |
6,632 | all-6633 | [
"globalCDtorName",
"demangles",
"a",
"global",
"constructor",
"/",
"destructor",
"symbol",
"name",
".",
"The",
"parameter",
"is",
"the",
"string",
"following",
"the",
"_GLOBAL_",
"prefix",
"."
] | [
"func",
"globalCDtorName",
"(",
"name",
"string",
",",
"options",
"...",
"Option",
")",
"(",
"AST",
",",
"error",
")",
"{",
"if",
"len",
"(",
"<mask>",
")",
"<",
"4",
"{",
"return",
"nil",
",",
"ErrNotMangledName",
"\n",
"}",
"\n",
"switch",
"name",
... |
6,633 | all-6634 | [
"Len",
"returns",
"the",
"number",
"of",
"frames",
"in",
"the",
"FrameSet",
".",
"If",
"a",
"frame",
"range",
"was",
"not",
"parsed",
"this",
"will",
"always",
"return",
"1"
] | [
"func",
"(",
"s",
"*",
"FileSequence",
")",
"Len",
"(",
")",
"int",
"{",
"if",
"s",
".",
"frameSet",
"==",
"nil",
"{",
"return",
"1",
"\n",
"}",
"\n",
"<mask>",
"s",
".",
"frameSet",
".",
"Len",
"(",
")",
"\n",
"}"
] |
6,634 | all-6635 | [
"PipelineReqFromInfo",
"converts",
"a",
"PipelineInfo",
"into",
"a",
"CreatePipelineRequest",
"."
] | [
"func",
"PipelineReqFromInfo",
"(",
"pipelineInfo",
"*",
"ppsclient",
".",
"PipelineInfo",
")",
"*",
"ppsclient",
".",
"CreatePipelineRequest",
"{",
"return",
"&",
"ppsclient",
".",
"CreatePipelineRequest",
"{",
"Pipeline",
":",
"pipelineInfo",
".",
"Pipeline",
",",... |
6,635 | all-6636 | [
"Run",
"starts",
"daemon",
"and",
"all",
"services",
"within",
"."
] | [
"func",
"(",
"d",
"*",
"Daemon",
")",
"Run",
"(",
")",
"(",
"err",
"error",
")",
"{",
"var",
"(",
"cl",
"*",
"cluster",
".",
"Cluster",
"\n",
"tracer",
"opentracing",
".",
"Tracer",
"\n",
")",
"\n",
"if",
"cl",
",",
"err",
"=",
"initCluster",
"("... |
6,636 | all-6637 | [
"HTTPRespondText",
"sets",
"Content",
"-",
"Type",
"to",
"text",
"/",
"plain",
"and",
"compresses",
"the",
"response",
"if",
"Content",
"-",
"Encoding",
"from",
"the",
"request",
"allows",
"it",
"."
] | [
"func",
"HTTPRespondText",
"(",
"response",
"string",
",",
"responseWriter",
"http",
".",
"ResponseWriter",
",",
"request",
"*",
"http",
".",
"Request",
")",
"(",
"err",
"error",
")",
"{",
"NewHTTPCompressHandlerFromFunc",
"(",
"func",
"(",
"responseWriter",
"ht... |
6,637 | all-6638 | [
"GamepadAxis",
"returns",
"the",
"float",
"value",
"[",
"-",
"1",
".",
"0",
"-",
"1",
".",
"0",
"]",
"of",
"the",
"given",
"gamepad",
"(",
"id",
")",
"s",
"axis",
"(",
"axis",
")",
".",
"GamepadAxis",
"is",
"concurrent",
"-",
"safe",
".",
"GamepadA... | [
"func",
"GamepadAxis",
"(",
"<mask>",
"int",
",",
"axis",
"int",
")",
"float64",
"{",
"return",
"uiDriver",
"(",
")",
".",
"Input",
"(",
")",
".",
"GamepadAxis",
"(",
"id",
",",
"axis",
")",
"\n",
"}"
] |
6,638 | all-6639 | [
"this",
"method",
"does",
"C",
"+",
"2",
"*",
"Z",
"requests",
":",
"C",
"=",
"total",
"number",
"of",
"changes",
"Z",
"=",
"number",
"of",
"affected",
"zones",
"(",
"1",
"login",
"+",
"1",
"commit",
")"
] | [
"func",
"(",
"d",
"*",
"dynProviderState",
")",
"ApplyChanges",
"(",
"<mask>",
"*",
"plan",
".",
"Changes",
")",
"error",
"{",
"log",
".",
"Debugf",
"(",
"\"",
"\"",
",",
"changes",
")",
"\n\n",
"if",
"d",
".",
"DryRun",
"{",
"log",
".",
"Infof",
"... |
6,639 | all-6640 | [
"InspectContainer",
"indicates",
"an",
"expected",
"call",
"of",
"InspectContainer"
] | [
"func",
"(",
"mr",
"*",
"MockDockerMetadataClientMockRecorder",
")",
"InspectContainer",
"(",
"arg0",
",",
"arg1",
",",
"arg2",
"<mask>",
"{",
"}",
")",
"*",
"gomock",
".",
"Call",
"{",
"return",
"mr",
".",
"mock",
".",
"ctrl",
".",
"RecordCallWithMethodType... |
6,640 | all-6641 | [
"Serialize",
"the",
"CHD",
".",
"The",
"serialized",
"form",
"is",
"conducive",
"to",
"mmapped",
"access",
".",
"See",
"the",
"Mmap",
"function",
"for",
"details",
"."
] | [
"func",
"(",
"c",
"*",
"CHD",
")",
"Write",
"(",
"w",
"io",
".",
"Writer",
")",
"error",
"{",
"write",
":=",
"func",
"(",
"nd",
"...",
"interface",
"{",
"}",
")",
"error",
"{",
"for",
"_",
",",
"d",
":=",
"range",
"nd",
"{",
"if",
"err",
":="... |
6,641 | all-6642 | [
"Sort",
"sorts",
"Args",
"by",
"key",
"and",
"then",
"value",
"using",
"f",
"as",
"comparison",
"function",
".",
"For",
"example",
"args",
".",
"Sort",
"(",
"bytes",
".",
"Compare",
")"
] | [
"func",
"(",
"a",
"*",
"Args",
")",
"Sort",
"(",
"f",
"func",
"(",
"x",
",",
"y",
"[",
"]",
"<mask>",
")",
"int",
")",
"{",
"sort",
".",
"SliceStable",
"(",
"a",
".",
"args",
",",
"func",
"(",
"i",
",",
"j",
"int",
")",
"bool",
"{",
"n",
... |
6,642 | all-6643 | [
"NewPatternForSurface",
"is",
"a",
"wrapper",
"around",
"cairo_pattern_create_for_surface",
"()",
"."
] | [
"func",
"NewPatternForSurface",
"(",
"s",
"*",
"Surface",
")",
"(",
"*",
"<mask>",
",",
"error",
")",
"{",
"c",
":=",
"C",
".",
"cairo_pattern_create_for_surface",
"(",
"s",
".",
"native",
"(",
")",
")",
"\n",
"return",
"newPatternFromNative",
"(",
"c",
... |
6,643 | all-6644 | [
"sshVolume",
"converts",
"a",
"secret",
"holding",
"ssh",
"keys",
"into",
"the",
"corresponding",
"volume",
"and",
"mount",
".",
"This",
"is",
"used",
"by",
"CloneRefs",
"to",
"attach",
"the",
"mount",
"to",
"the",
"clonerefs",
"container",
"."
] | [
"func",
"sshVolume",
"(",
"secret",
"string",
")",
"(",
"coreapi",
".",
"Volume",
",",
"coreapi",
".",
"VolumeMount",
")",
"{",
"var",
"sshKeyMode",
"int32",
"=",
"0400",
"// this is octal, so symbolic ref is `u+r`",
"\n",
"name",
":=",
"strings",
".",
"Join",
... |
6,644 | all-6645 | [
"UnmarshalEasyJSON",
"satisfies",
"easyjson",
".",
"Unmarshaler",
"."
] | [
"func",
"(",
"t",
"*",
"RequestStage",
")",
"UnmarshalEasyJSON",
"(",
"in",
"*",
"jlexer",
".",
"Lexer",
")",
"{",
"switch",
"RequestStage",
"(",
"in",
".",
"String",
"(",
")",
")",
"{",
"case",
"RequestStageRequest",
":",
"*",
"t",
"=",
"RequestStageReq... |
6,645 | all-6646 | [
"NewWithClient",
"creates",
"a",
"new",
"client",
"with",
"your",
"personal",
"API",
"key",
"and",
"the",
"given",
"http",
"Client"
] | [
"func",
"NewWithClient",
"(",
"apikey",
"string",
",",
"client",
"*",
"http",
".",
"Client",
")",
"*",
"Client",
"{",
"endpoint",
":=",
"Endpoint",
"{",
"<mask>",
":",
"EndpointURL",
"}",
"\n",
"return",
"&",
"Client",
"{",
"apikey",
",",
"client",
",",
... |
6,646 | all-6647 | [
"SetProgressPulseStep",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_entry_set_progress_pulse_step",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"SetProgressPulseStep",
"(",
"fraction",
"float64",
")",
"{",
"C",
".",
"gtk_entry_set_progress_pulse_step",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"gdouble",
"(",
"fraction",
")",
")",
"\n",
"}"
] |
6,647 | all-6648 | [
"WithHandleAuthRequests",
"if",
"true",
"authRequired",
"events",
"will",
"be",
"issued",
"and",
"requests",
"will",
"be",
"paused",
"expecting",
"a",
"call",
"to",
"continueWithAuth",
"."
] | [
"func",
"(",
"p",
"EnableParams",
")",
"WithHandleAuthRequests",
"(",
"handleAuthRequests",
"bool",
")",
"*",
"EnableParams",
"{",
"p",
".",
"HandleAuthRequests",
"=",
"handleAuthRequests",
"\n",
"<mask>",
"&",
"p",
"\n",
"}"
] |
6,648 | all-6649 | [
"Close",
"the",
"background",
"processing",
"of",
"the",
"storage",
"queues",
"."
] | [
"func",
"(",
"s",
"*",
"<mask>",
")",
"Close",
"(",
")",
"error",
"{",
"s",
".",
"mtx",
".",
"Lock",
"(",
")",
"\n",
"defer",
"s",
".",
"mtx",
".",
"Unlock",
"(",
")",
"\n\n",
"for",
"_",
",",
"q",
":=",
"range",
"s",
".",
"queues",
"{",
"q... |
6,649 | all-6650 | [
"MutateTransaction",
"for",
"SourceAccount",
"sets",
"the",
"transaction",
"s",
"SourceAccount",
"to",
"the",
"pubilic",
"key",
"for",
"the",
"address",
"provided"
] | [
"func",
"(",
"m",
"SourceAccount",
")",
"MutateTransaction",
"(",
"o",
"*",
"TransactionBuilder",
")",
"<mask>",
"{",
"return",
"setAccountId",
"(",
"m",
".",
"AddressOrSeed",
",",
"&",
"o",
".",
"TX",
".",
"SourceAccount",
")",
"\n",
"}"
] |
6,650 | all-6651 | [
"ValidatePolicyConfigurationScope",
"checks",
"that",
"scope",
"is",
"a",
"valid",
"name",
"for",
"a",
"signature",
".",
"PolicyTransportScopes",
"keys",
"(",
"i",
".",
"e",
".",
"a",
"valid",
"PolicyConfigurationIdentity",
"()",
"or",
"PolicyConfigurationNamespaces",... | [
"func",
"(",
"t",
"daemonTransport",
")",
"ValidatePolicyConfigurationScope",
"(",
"scope",
"string",
")",
"error",
"{",
"// ID values cannot be effectively namespaced, and are clearly invalid host:port values.",
"if",
"_",
",",
"err",
":=",
"digest",
".",
"Parse",
"(",
"... |
6,651 | all-6652 | [
"AddHerokuKey",
"associates",
"a",
"Heroku",
"key",
"with",
"the",
"user",
"s",
"API",
"token",
"to",
"allow",
"CircleCI",
"to",
"deploy",
"to",
"Heroku",
"on",
"your",
"behalf",
"The",
"API",
"token",
"being",
"used",
"must",
"be",
"a",
"user",
"API",
"... | [
"func",
"(",
"c",
"*",
"<mask>",
")",
"AddHerokuKey",
"(",
"key",
"string",
")",
"error",
"{",
"body",
":=",
"struct",
"{",
"APIKey",
"string",
"`json:\"apikey\"`",
"\n",
"}",
"{",
"APIKey",
":",
"key",
"}",
"\n\n",
"return",
"c",
".",
"request",
"(",
... |
6,652 | all-6653 | [
"const",
"char",
"*",
"pango_layout_get_text",
"(",
"PangoLayout",
"*",
"layout",
")",
";"
] | [
"func",
"(",
"v",
"*",
"Layout",
")",
"GetText",
"(",
")",
"string",
"{",
"c",
":=",
"C",
".",
"pango_layout_get_text",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"return",
"C",
".",
"GoString",
"(",
"(",
"*",
"C",
".",
"<mask>",
")",
"(",
"... |
6,653 | all-6654 | [
"AddPeer",
"implements",
"Reactor",
"by",
"adding",
"peer",
"to",
"the",
"address",
"book",
"(",
"if",
"inbound",
")",
"or",
"by",
"requesting",
"more",
"addresses",
"(",
"if",
"outbound",
")",
"."
] | [
"func",
"(",
"r",
"*",
"PEXReactor",
")",
"AddPeer",
"(",
"p",
"*",
"Peer",
")",
"{",
"if",
"p",
".",
"IsOutbound",
"(",
")",
"{",
"// For outbound peers, the address is already in the books.",
"// Either it was added in DialSeeds or when we",
"// received the peer's addr... |
6,654 | all-6655 | [
"UnmarshalJSON",
"satisfies",
"json",
".",
"Unmarshaler",
"."
] | [
"func",
"(",
"t",
"*",
"WindowState",
")",
"UnmarshalJSON",
"(",
"buf",
"[",
"]",
"<mask>",
")",
"error",
"{",
"return",
"easyjson",
".",
"Unmarshal",
"(",
"buf",
",",
"t",
")",
"\n",
"}"
] |
6,655 | all-6656 | [
"WithTimeout",
"adds",
"the",
"timeout",
"to",
"the",
"get",
"apps",
"params"
] | [
"func",
"(",
"o",
"*",
"GetAppsParams",
")",
"WithTimeout",
"(",
"timeout",
"<mask>",
".",
"Duration",
")",
"*",
"GetAppsParams",
"{",
"o",
".",
"SetTimeout",
"(",
"timeout",
")",
"\n",
"return",
"o",
"\n",
"}"
] |
6,656 | all-6657 | [
"native",
"returns",
"a",
"pointer",
"to",
"the",
"underlying",
"GtkStyleContext",
"."
] | [
"func",
"(",
"v",
"*",
"StyleContext",
")",
"native",
"(",
")",
"*",
"C",
".",
"GtkStyleContext",
"{",
"if",
"v",
"==",
"nil",
"||",
"v",
".",
"<mask>",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"p",
":=",
"unsafe",
".",
"Pointer",
"(",... |
6,657 | all-6658 | [
"SetCursor",
"is",
"a",
"wrapper",
"around",
"gtk_tree_view_set_cursor",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"TreeView",
")",
"SetCursor",
"(",
"path",
"*",
"TreePath",
",",
"focusColumn",
"*",
"TreeViewColumn",
",",
"startEditing",
"bool",
")",
"{",
"C",
".",
"gtk_tree_view_set_cursor",
"(",
"v",
".",
"native",
"(",
")",
",",
"<mask>",
"... |
6,658 | all-6659 | [
"shouldOverrideIPCMode",
"returns",
"true",
"if",
"the",
"IPCMode",
"of",
"the",
"container",
"needs",
"to",
"be",
"overridden",
".",
"It",
"also",
"returns",
"the",
"override",
"string",
"in",
"this",
"case",
".",
"It",
"returns",
"false",
"otherwise"
] | [
"func",
"(",
"task",
"*",
"Task",
")",
"shouldOverrideIPCMode",
"(",
"container",
"*",
"apicontainer",
".",
"Container",
",",
"dockerContainerMap",
"map",
"[",
"string",
"]",
"*",
"apicontainer",
".",
"DockerContainer",
")",
"(",
"bool",
",",
"string",
")",
... |
6,659 | all-6660 | [
"GetBuilds",
"lists",
"all",
"scheduled",
"builds",
"for",
"the",
"provided",
"job",
".",
"In",
"newer",
"Jenkins",
"versions",
"this",
"also",
"includes",
"enqueued",
"builds",
"(",
"tested",
"in",
"2",
".",
"73",
".",
"2",
")",
"."
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"GetBuilds",
"(",
"job",
"string",
")",
"(",
"map",
"[",
"string",
"]",
"Build",
",",
"error",
")",
"{",
"c",
".",
"logger",
".",
"Debugf",
"(",
"\"",
"\"",
",",
"<mask>",
")",
"\n\n",
"data",
",",
"err",
"... |
6,660 | all-6661 | [
"/",
"*",
"During",
"stage",
"planning",
"stages",
"of",
"equal",
"precedence",
"are",
"parsed",
"such",
"that",
"they",
"ll",
"be",
"evaluated",
"in",
"reverse",
"order",
".",
"For",
"commutative",
"operators",
"like",
"+",
"or",
"-",
"it",
"s",
"no",
"... | [
"func",
"reorderStages",
"(",
"rootStage",
"*",
"evaluationStage",
")",
"{",
"// traverse every rightStage until we find multiples in a row of the same precedence.",
"<mask>",
"identicalPrecedences",
"[",
"]",
"*",
"evaluationStage",
"\n",
"var",
"currentStage",
",",
"nextStage... |
6,661 | all-6662 | [
"WritePackage",
"writes",
"to",
"buf",
"a",
"human",
"-",
"readable",
"summary",
"of",
"p",
"."
] | [
"func",
"WritePackage",
"(",
"buf",
"*",
"bytes",
".",
"Buffer",
",",
"p",
"*",
"Package",
")",
"{",
"fmt",
".",
"Fprintf",
"(",
"buf",
",",
"\"",
"\\n",
"\"",
",",
"p",
")",
"\n\n",
"var",
"names",
"[",
"]",
"string",
"\n",
"maxname",
":=",
"0",... |
6,662 | all-6663 | [
"Printf",
"implements",
"zk",
".",
"Logger",
"."
] | [
"func",
"(",
"zl",
"ZookeeperLogger",
")",
"Printf",
"(",
"s",
"string",
",",
"i",
"...",
"interface",
"{",
"}",
")",
"{",
"level",
".",
"Info",
"(",
"zl",
".",
"logger",
")",
".",
"<mask>",
"(",
"\"",
"\"",
",",
"fmt",
".",
"Sprintf",
"(",
"s",
... |
6,663 | all-6664 | [
"Relocate",
"produces",
"a",
"VirtualMachineRelocateSpecDiskLocator",
"for",
"this",
"resource",
"and",
"is",
"used",
"for",
"both",
"cloning",
"and",
"storage",
"vMotion",
"."
] | [
"func",
"(",
"r",
"*",
"DiskSubresource",
")",
"Relocate",
"(",
"l",
"object",
".",
"VirtualDeviceList",
",",
"clone",
"bool",
")",
"(",
"types",
".",
"VirtualMachineRelocateSpecDiskLocator",
",",
"error",
")",
"{",
"log",
".",
"Printf",
"(",
"\"",
"\"",
"... |
6,664 | all-6665 | [
"SetStringPtr",
"sets",
"a",
"ResourceData",
"field",
"depending",
"on",
"if",
"a",
"*",
"string",
"exists",
"or",
"not",
".",
"The",
"field",
"is",
"not",
"set",
"if",
"it",
"s",
"nil",
"."
] | [
"func",
"SetStringPtr",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"key",
"string",
",",
"val",
"*",
"string",
")",
"error",
"{",
"if",
"val",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"err",
":=",
"d",
".",
"<mask>",
"(",
"key",
... |
6,665 | all-6666 | [
"title",
":",
"webhook",
"create",
"path",
":",
"/",
"events",
"/",
"webhooks",
"method",
":",
"POST",
"responses",
":",
"200",
":",
"Webhook",
"created",
"401",
":",
"Unauthorized",
"400",
":",
"Invalid",
"webhook",
"409",
":",
"Webhook",
"already",
"exis... | [
"func",
"webhookCreate",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"t",
"auth",
".",
"Token",
")",
"error",
"{",
"var",
"webhook",
"eventTypes",
".",
"Webhook",
"\n",
"err",
":=",
"ParseInput",
"(",
"r",
",",
... |
6,666 | all-6667 | [
"render",
"indexed",
"primitives",
"from",
"array",
"data",
"taking",
"parameters",
"from",
"memory"
] | [
"func",
"DrawElementsIndirect",
"(",
"mode",
"uint32",
",",
"xtype",
"uint32",
",",
"indirect",
"unsafe",
".",
"Pointer",
")",
"{",
"syscall",
".",
"Syscall",
"(",
"gpDrawElementsIndirect",
",",
"3",
",",
"uintptr",
"(",
"<mask>",
")",
",",
"uintptr",
"(",
... |
6,667 | all-6668 | [
"ReadJSON",
"deserializes",
"JSON",
"from",
"the",
"underlying",
"reader",
"into",
"data",
"."
] | [
"func",
"(",
"r",
"ArgReadHelper",
")",
"ReadJSON",
"(",
"data",
"<mask>",
"{",
"}",
")",
"error",
"{",
"return",
"r",
".",
"read",
"(",
"func",
"(",
")",
"error",
"{",
"// TChannel allows for 0 length values (not valid JSON), so we use a bufio.Reader",
"// to check... |
6,668 | all-6669 | [
"ReadHeader",
"simply",
"wraps",
"csv",
".",
"Reader",
".",
"Read",
"()",
"."
] | [
"func",
"(",
"r",
"*",
"Reader",
")",
"ReadHeader",
"(",
")",
"(",
"columns",
"[",
"]",
"<mask>",
",",
"err",
"error",
")",
"{",
"return",
"r",
".",
"Reader",
".",
"Read",
"(",
")",
"\n",
"}"
] |
6,669 | all-6670 | [
"MarshalJSON",
"implements",
"json",
".",
"Marshaler",
".",
"It",
"will",
"encode",
"the",
"zero",
"value",
"of",
"time",
".",
"Time",
"if",
"this",
"time",
"is",
"invalid",
"."
] | [
"func",
"(",
"t",
"Time",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"if",
"!",
"t",
".",
"Valid",
"{",
"return",
"(",
"time",
".",
"Time",
"{",
"}",
")",
".",
"MarshalJSON",
"(",
")",
"\n",
"}",
"\n",
"ret... |
6,670 | all-6671 | [
"balnic_path",
"returns",
"the",
"string",
"/",
"loadbalancers",
"/",
"<lbalid",
">",
"/",
"balancednics<balnicid",
">"
] | [
"func",
"balnicPath",
"(",
"dcid",
",",
"lbalid",
",",
"balnicid",
"string",
")",
"<mask>",
"{",
"return",
"balnicColPath",
"(",
"dcid",
",",
"lbalid",
")",
"+",
"slash",
"(",
"balnicid",
")",
"\n",
"}"
] |
6,671 | all-6672 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"EmulateNetworkConditionsParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"<mask>",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork58",
... |
6,672 | all-6673 | [
"MapValues",
"returns",
"the",
"list",
"of",
"values",
"in",
"the",
"map",
"sorted",
"by",
"key",
"."
] | [
"func",
"(",
"s",
"*",
"Scratch",
")",
"MapValues",
"(",
"k",
"string",
")",
"(",
"[",
"]",
"interface",
"{",
"}",
",",
"error",
")",
"{",
"s",
".",
"init",
"(",
")",
"\n\n",
"s",
".",
"Lock",
"(",
")",
"\n",
"defer",
"s",
".",
"Unlock",
"(",... |
6,673 | all-6674 | [
"GetNotifyNoData",
"returns",
"the",
"NotifyNoData",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"o",
"*",
"Options",
")",
"GetNotifyNoData",
"(",
")",
"bool",
"{",
"if",
"o",
"==",
"nil",
"||",
"o",
".",
"NotifyNoData",
"==",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n",
"return",
"*",
"o",
".",
"NotifyNoData",
"\n",
"}"
] |
6,674 | all-6675 | [
"listDatum",
"contains",
"our",
"internal",
"implementation",
"of",
"ListDatum",
"which",
"is",
"shared",
"between",
"ListDatum",
"and",
"ListDatumStream",
".",
"When",
"ListDatum",
"is",
"removed",
"this",
"should",
"be",
"inlined",
"into",
"ListDatumStream"
] | [
"func",
"(",
"a",
"*",
"apiServer",
")",
"listDatum",
"(",
"pachClient",
"*",
"client",
".",
"APIClient",
",",
"job",
"*",
"pps",
".",
"Job",
",",
"page",
",",
"pageSize",
"int64",
")",
"(",
"response",
"*",
"pps",
".",
"ListDatumResponse",
",",
"retEr... |
6,675 | all-6676 | [
"Entomb",
"sets",
"the",
"tomb",
"bit",
"on",
"a",
"relayItem",
"and",
"schedules",
"a",
"garbage",
"collection",
".",
"It",
"returns",
"the",
"entombed",
"item",
"along",
"with",
"a",
"bool",
"indicating",
"whether",
"we",
"completed",
"a",
"relayed",
"call... | [
"func",
"(",
"r",
"*",
"relayItems",
")",
"Entomb",
"(",
"id",
"uint32",
",",
"deleteAfter",
"time",
".",
"Duration",
")",
"(",
"relayItem",
",",
"bool",
")",
"{",
"r",
".",
"Lock",
"(",
")",
"\n",
"if",
"r",
".",
"tombs",
">",
"_maxRelayTombs",
"{... |
6,676 | all-6677 | [
"instruct",
"the",
"GL",
"server",
"to",
"block",
"until",
"the",
"specified",
"sync",
"object",
"becomes",
"signaled"
] | [
"func",
"WaitSync",
"(",
"<mask>",
"uintptr",
",",
"flags",
"uint32",
",",
"timeout",
"uint64",
")",
"{",
"syscall",
".",
"Syscall",
"(",
"gpWaitSync",
",",
"3",
",",
"uintptr",
"(",
"sync",
")",
",",
"uintptr",
"(",
"flags",
")",
",",
"uintptr",
"(",
... |
6,677 | all-6678 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"CloseParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage75",
"(",
"&",
"w",
",",
"v",
")",
"\n",... |
6,678 | all-6679 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"GetIsolateIDParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime24",
"(",
"&",
"w",
",",
"v",
")... |
6,679 | all-6680 | [
"subresourceSchema",
"is",
"a",
"map",
"[",
"string",
"]",
"*",
"schema",
".",
"Schema",
"of",
"common",
"schema",
"fields",
".",
"This",
"includes",
"the",
"internal_id",
"field",
"which",
"is",
"used",
"as",
"a",
"unique",
"ID",
"for",
"the",
"lifecycle"... | [
"func",
"subresourceSchema",
"(",
")",
"map",
"[",
"string",
"]",
"*",
"schema",
".",
"Schema",
"{",
"return",
"map",
"[",
"string",
"]",
"*",
"schema",
".",
"Schema",
"{",
"\"",
"\"",
":",
"{",
"Type",
":",
"schema",
".",
"TypeInt",
",",
"Computed",... |
6,680 | all-6681 | [
"executeTemplateFunc",
"executes",
"the",
"given",
"template",
"in",
"the",
"context",
"of",
"the",
"parent",
".",
"If",
"an",
"argument",
"is",
"specified",
"it",
"will",
"be",
"used",
"as",
"the",
"context",
"instead",
".",
"This",
"can",
"be",
"used",
"... | [
"func",
"executeTemplateFunc",
"(",
"t",
"*",
"template",
".",
"Template",
")",
"func",
"(",
"string",
",",
"...",
"interface",
"{",
"}",
")",
"(",
"string",
",",
"error",
")",
"{",
"return",
"func",
"(",
"s",
"string",
",",
"data",
"...",
"interface",... |
6,681 | all-6682 | [
"DerivePublicKeyForPath",
"derives",
"the",
"public",
"key",
"by",
"following",
"the",
"path",
"from",
"pubKeyBytes",
"using",
"the",
"given",
"chainCode",
"."
] | [
"func",
"DerivePublicKeyForPath",
"(",
"pubKeyBytes",
"[",
"]",
"byte",
",",
"chainCode",
"[",
"]",
"byte",
",",
"path",
"string",
")",
"[",
"]",
"byte",
"{",
"data",
":=",
"pubKeyBytes",
"\n",
"parts",
":=",
"strings",
".",
"Split",
"(",
"path",
",",
... |
6,682 | all-6683 | [
"RenameImageAlias",
"renames",
"an",
"existing",
"image",
"alias"
] | [
"func",
"(",
"r",
"*",
"ProtocolLXD",
")",
"RenameImageAlias",
"(",
"name",
"string",
",",
"alias",
"api",
".",
"ImageAliasesEntryPost",
")",
"error",
"{",
"// Send the request",
"_",
",",
"_",
",",
"err",
":=",
"r",
".",
"query",
"(",
"\"",
"\"",
",",
... |
6,683 | all-6684 | [
"newAssignees",
"creates",
"a",
"new",
"Label",
"for",
"each",
"label",
"in",
"the",
"issue"
] | [
"func",
"newAssignees",
"(",
"issueID",
"int",
",",
"gAssignees",
"[",
"]",
"*",
"github",
".",
"User",
",",
"repository",
"string",
")",
"(",
"[",
"]",
"sql",
".",
"Assignee",
",",
"error",
")",
"{",
"assignees",
":=",
"[",
"]",
"sql",
".",
"Assigne... |
6,684 | all-6685 | [
"NthDataWrapped",
"acts",
"the",
"same",
"as",
"g_list_nth_data",
"()",
"but",
"passes",
"retrieved",
"value",
"before",
"returning",
"through",
"wrap",
"function",
"set",
"by",
"DataWrapper",
"()",
".",
"If",
"no",
"wrap",
"function",
"is",
"set",
"it",
"retu... | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"NthData",
"(",
"n",
"uint",
")",
"interface",
"{",
"}",
"{",
"ptr",
":=",
"v",
".",
"nthDataRaw",
"(",
"n",
")",
"\n",
"if",
"v",
".",
"dataWrap",
"!=",
"nil",
"{",
"return",
"v",
".",
"dataWrap",
"(",
"pt... |
6,685 | all-6686 | [
"Write",
"serializes",
"the",
"command",
"to",
"the",
"given",
"buffered",
"output",
"satisfies",
"the",
"Command",
"interface",
"."
] | [
"func",
"(",
"c",
"MPub",
")",
"Write",
"(",
"w",
"*",
"bufio",
".",
"Writer",
")",
"(",
"err",
"error",
")",
"{",
"for",
"_",
",",
"s",
":=",
"range",
"[",
"...",
"]",
"string",
"{",
"\"",
"\"",
",",
"c",
".",
"Topic",
",",
"\"",
"\\n",
"\... |
6,686 | all-6687 | [
"handle",
"is",
"the",
"workhorse",
"the",
"will",
"actually",
"make",
"updates",
"to",
"the",
"PR",
".",
"The",
"algorithm",
"goes",
"as",
":",
"-",
"Initially",
"we",
"build",
"an",
"approverSet",
"-",
"Go",
"through",
"all",
"comments",
"in",
"order",
... | [
"func",
"handle",
"(",
"log",
"*",
"logrus",
".",
"Entry",
",",
"ghc",
"githubClient",
",",
"repo",
"approvers",
".",
"Repo",
",",
"githubConfig",
"config",
".",
"GitHubOptions",
",",
"opts",
"*",
"plugins",
".",
"Approve",
",",
"pr",
"*",
"state",
")",
... |
6,687 | all-6688 | [
"Substitute",
"attemps",
"to",
"substitute",
"the",
"path",
"pattern",
"variables",
"with",
"the",
"given",
"values",
".",
"-",
"If",
"the",
"substitution",
"succeeds",
"it",
"returns",
"the",
"resulting",
"path",
"and",
"the",
"list",
"of",
"variable",
"names... | [
"func",
"(",
"p",
"*",
"PathPattern",
")",
"Substitute",
"(",
"vars",
"[",
"]",
"*",
"PathVariable",
")",
"(",
"string",
",",
"[",
"]",
"string",
")",
"{",
"values",
":=",
"make",
"(",
"[",
"]",
"interface",
"{",
"}",
",",
"len",
"(",
"p",
".",
... |
6,688 | all-6689 | [
"ListTeams",
"return",
"a",
"list",
"of",
"fake",
"teams",
"that",
"correspond",
"to",
"the",
"fake",
"team",
"members",
"returned",
"by",
"ListTeamMembers"
] | [
"func",
"(",
"f",
"*",
"FakeClient",
")",
"ListTeams",
"(",
"org",
"string",
")",
"(",
"[",
"]",
"github",
".",
"Team",
",",
"error",
")",
"{",
"return",
"[",
"]",
"github",
".",
"Team",
"{",
"{",
"ID",
":",
"0",
",",
"Name",
":",
"\"",
"\"",
... |
6,689 | all-6690 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"EventTargetInfoChanged",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget13",
"(",
"&... |
6,690 | all-6691 | [
"newPrefixTree",
"creates",
"a",
"new",
"prefixTrie",
"."
] | [
"func",
"newPrefixTree",
"(",
"version",
"rnet",
".",
"IPVersion",
")",
"Ranger",
"{",
"_",
",",
"rootNet",
",",
"_",
":=",
"net",
".",
"ParseCIDR",
"(",
"\"",
"\"",
")",
"\n",
"if",
"<mask>",
"==",
"rnet",
".",
"IPv6",
"{",
"_",
",",
"rootNet",
",... |
6,691 | all-6692 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"GetHeapObjectIDParams",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler14",
"(",... |
6,692 | all-6693 | [
"StructFieldFromJSONName",
"returns",
"the",
"struct",
"field",
"name",
"on",
"the",
"given",
"struct",
"value",
".",
"Empty",
"value",
"means",
"the",
"field",
"is",
"either",
"not",
"public",
"or",
"does",
"not",
"exist",
".",
"This",
"can",
"be",
"used",
... | [
"func",
"StructFieldFromJSONName",
"(",
"v",
"reflect",
".",
"Value",
",",
"name",
"string",
")",
"string",
"{",
"if",
"v",
".",
"Kind",
"(",
")",
"!=",
"reflect",
".",
"Struct",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n\n",
"m",
":=",
"getType2jfm",
... |
6,693 | all-6694 | [
"Endpoints",
"collects",
"endpoints",
"of",
"all",
"nested",
"Sources",
"and",
"returns",
"them",
"in",
"a",
"single",
"slice",
"."
] | [
"func",
"(",
"ms",
"*",
"multiSource",
")",
"Endpoints",
"(",
")",
"(",
"[",
"]",
"*",
"endpoint",
".",
"Endpoint",
",",
"error",
")",
"{",
"<mask>",
":=",
"[",
"]",
"*",
"endpoint",
".",
"Endpoint",
"{",
"}",
"\n\n",
"for",
"_",
",",
"s",
":=",
... |
6,694 | all-6695 | [
"HasCreatedBy",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"s",
"*",
"SyntheticsTest",
")",
"HasCreatedBy",
"(",
")",
"bool",
"{",
"if",
"s",
"!=",
"nil",
"&&",
"s",
".",
"CreatedBy",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"<mask>",
"\n",
"}"
] |
6,695 | all-6696 | [
"evalTimestamp",
"returns",
"the",
"immediately",
"preceding",
"consistently",
"slotted",
"evaluation",
"time",
"."
] | [
"func",
"(",
"g",
"*",
"Group",
")",
"evalTimestamp",
"(",
")",
"time",
".",
"Time",
"{",
"var",
"(",
"offset",
"=",
"int64",
"(",
"g",
".",
"hash",
"(",
")",
"%",
"uint64",
"(",
"g",
".",
"interval",
")",
")",
"\n",
"now",
"=",
"time",
".",
... |
6,696 | all-6697 | [
"Field",
"allows",
"validation",
"of",
"a",
"single",
"field",
"still",
"using",
"tag",
"style",
"validation",
"to",
"check",
"multiple",
"errors"
] | [
"func",
"(",
"v",
"*",
"Validate",
")",
"Field",
"(",
"f",
"<mask>",
"{",
"}",
",",
"tag",
"string",
")",
"*",
"FieldError",
"{",
"return",
"v",
".",
"FieldWithValue",
"(",
"nil",
",",
"f",
",",
"tag",
")",
"\n",
"}"
] |
6,697 | all-6698 | [
"initializeResourceFields",
"exists",
"mainly",
"for",
"testing",
"doStart",
"()",
"to",
"use",
"mock",
"Control",
"object"
] | [
"func",
"(",
"agent",
"*",
"ecsAgent",
")",
"initializeResourceFields",
"(",
"credentialsManager",
"credentials",
".",
"Manager",
")",
"{",
"agent",
".",
"resourceFields",
"=",
"&",
"taskresource",
".",
"ResourceFields",
"{",
"Control",
":",
"cgroup",
".",
"New"... |
6,698 | all-6699 | [
"TokenBlacklister",
"returns",
"a",
"handler",
"that",
"will",
"blacklist",
"any",
"token",
"found",
"in",
"the",
"request",
".",
"Typically",
"to",
"be",
"used",
"around",
"logout",
"handlers",
".",
"If",
"handler",
"h",
"is",
"nil",
"upon",
"successful",
"... | [
"func",
"TokenBlacklister",
"(",
"h",
"http",
".",
"Handler",
",",
"store",
"TokenStorage",
",",
"secret",
"[",
"]",
"byte",
",",
"opts",
"...",
"TokenOpt",
")",
"http",
".",
"Handler",
"{",
"o",
":=",
"options",
"{",
"logger",
":",
"handler",
".",
"No... |
6,699 | all-6700 | [
"StatusString",
"returns",
"a",
"human",
"readable",
"string",
"representation",
"of",
"this",
"object"
] | [
"func",
"(",
"<mask>",
"SSMSecretStatus",
")",
"String",
"(",
")",
"string",
"{",
"for",
"k",
",",
"v",
":=",
"range",
"ssmSecretStatusMap",
"{",
"if",
"v",
"==",
"as",
"{",
"return",
"k",
"\n",
"}",
"\n",
"}",
"\n",
"return",
"\"",
"\"",
"\n",
"}"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.