id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
20,400 | all-20401 | [
"NewKeysAPIWithPrefix",
"acts",
"like",
"NewKeysAPI",
"but",
"allows",
"the",
"caller",
"to",
"provide",
"a",
"custom",
"base",
"URL",
"path",
".",
"This",
"should",
"only",
"be",
"used",
"in",
"very",
"rare",
"cases",
"."
] | [
"func",
"NewKeysAPIWithPrefix",
"(",
"c",
"<mask>",
",",
"p",
"string",
")",
"KeysAPI",
"{",
"return",
"&",
"httpKeysAPI",
"{",
"client",
":",
"c",
",",
"prefix",
":",
"p",
",",
"}",
"\n",
"}"
] |
20,401 | all-20402 | [
"MustParse",
"processes",
"command",
"line",
"arguments",
"and",
"exits",
"upon",
"failure"
] | [
"func",
"MustParse",
"(",
"dest",
"...",
"interface",
"{",
"}",
")",
"*",
"Parser",
"{",
"p",
",",
"err",
":=",
"NewParser",
"(",
"Config",
"{",
"}",
",",
"dest",
"...",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"fmt",
".",
"Println",
"(",
"err",... |
20,402 | all-20403 | [
"toMap",
"returns",
"maps",
"the",
"file",
"name",
"to",
"its",
"coverage",
"for",
"faster",
"retrieval",
"&",
"membership",
"check"
] | [
"func",
"toMap",
"(",
"g",
"*",
"calculation",
".",
"CoverageList",
")",
"map",
"[",
"string",
"]",
"calculation",
".",
"Coverage",
"{",
"m",
":=",
"<mask>",
"(",
"map",
"[",
"string",
"]",
"calculation",
".",
"Coverage",
")",
"\n",
"for",
"_",
",",
... |
20,403 | all-20404 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"SetScriptExecutionDisabledParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"<mask>",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation5",... |
20,404 | all-20405 | [
"expandCustomizationSysprepText",
"reads",
"certain",
"ResourceData",
"keys",
"and",
"returns",
"a",
"CustomizationSysprepText",
"."
] | [
"func",
"expandCustomizationSysprepText",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
")",
"*",
"types",
".",
"CustomizationSysprepText",
"{",
"obj",
":=",
"&",
"<mask>",
".",
"CustomizationSysprepText",
"{",
"Value",
":",
"d",
".",
"Get",
"(",
"cKeyPrefix",
... |
20,405 | all-20406 | [
"Calculate",
"computes",
"the",
"actions",
"needed",
"to",
"move",
"current",
"state",
"towards",
"desired",
"state",
".",
"It",
"then",
"passes",
"those",
"changes",
"to",
"the",
"current",
"policy",
"for",
"further",
"processing",
".",
"It",
"returns",
"a",
... | [
"func",
"(",
"p",
"*",
"Plan",
")",
"Calculate",
"(",
")",
"*",
"Plan",
"{",
"t",
":=",
"newPlanTable",
"(",
")",
"\n\n",
"for",
"_",
",",
"current",
":=",
"range",
"filterRecordsForPlan",
"(",
"p",
".",
"Current",
")",
"{",
"t",
".",
"addCurrent",
... |
20,406 | all-20407 | [
"MapExprStrings",
"applies",
"a",
"function",
"to",
"string",
"sub",
"-",
"expressions",
"within",
"e",
".",
"An",
"expression",
"containing",
"the",
"results",
"with",
"the",
"same",
"structure",
"as",
"e",
"is",
"returned",
"."
] | [
"func",
"MapExprStrings",
"(",
"e",
"bzl",
".",
"Expr",
",",
"f",
"func",
"(",
"string",
")",
"string",
")",
"bzl",
".",
"Expr",
"{",
"if",
"e",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"switch",
"expr",
":=",
"e",
".",
"(",
"type",
... |
20,407 | all-20408 | [
"SetupTrust",
"is",
"a",
"convenience",
"around",
"ContainerServer",
".",
"CreateCertificate",
"that",
"adds",
"the",
"given",
"client",
"certificate",
"to",
"the",
"trusted",
"pool",
"of",
"the",
"cluster",
"at",
"the",
"given",
"address",
"using",
"the",
"give... | [
"func",
"SetupTrust",
"(",
"cert",
",",
"targetAddress",
",",
"targetCert",
",",
"targetPassword",
"string",
")",
"error",
"{",
"// Connect to the target cluster node.",
"args",
":=",
"&",
"lxd",
".",
"ConnectionArgs",
"{",
"TLSServerCert",
":",
"targetCert",
",",
... |
20,408 | all-20409 | [
"HasOrderDir",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"t",
"*",
"TileDefRequest",
")",
"HasOrderDir",
"(",
")",
"bool",
"{",
"if",
"t",
"!=",
"nil",
"&&",
"t",
".",
"OrderDir",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"<mask>",
"\n",
"}"
] |
20,409 | all-20410 | [
"detectBinaryBody",
"returns",
"true",
"if",
"the",
"mail",
"header",
"defines",
"a",
"binary",
"body",
"."
] | [
"func",
"detectBinaryBody",
"(",
"root",
"*",
"Part",
")",
"bool",
"{",
"if",
"detectTextHeader",
"(",
"root",
".",
"Header",
",",
"<mask>",
")",
"{",
"return",
"false",
"\n",
"}",
"\n\n",
"isBin",
":=",
"detectAttachmentHeader",
"(",
"root",
".",
"Header"... |
20,410 | all-20411 | [
"GetIconOk",
"returns",
"a",
"tuple",
"with",
"the",
"Icon",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"c",
"*",
"CreatedBy",
")",
"GetIconOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"c",
"==",
"nil",
"||",
"c",
".",
"Icon",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"return",
"*",
"c",
"... |
20,411 | all-20412 | [
"PProfHandlers",
"returns",
"a",
"map",
"of",
"pprof",
"handlers",
"keyed",
"by",
"the",
"HTTP",
"path",
"."
] | [
"func",
"PProfHandlers",
"(",
")",
"map",
"[",
"string",
"]",
"http",
".",
"Handler",
"{",
"// set only when there's no existing setting",
"if",
"runtime",
".",
"SetMutexProfileFraction",
"(",
"-",
"1",
")",
"==",
"0",
"{",
"// 1 out of 5 mutex events are reported, on... |
20,412 | all-20413 | [
"String",
"implements",
"Stringer",
"interface",
"."
] | [
"func",
"(",
"i",
"Identifier",
")",
"<mask>",
"(",
")",
"string",
"{",
"s",
":=",
"string",
"(",
"i",
")",
"\n",
"if",
"reSimple",
".",
"MatchString",
"(",
"s",
")",
"{",
"return",
"s",
"\n",
"}",
"\n",
"return",
"strconv",
".",
"Quote",
"(",
"s... |
20,413 | all-20414 | [
"l",
".",
"firstIndex",
"<",
"=",
"lo",
"<",
"=",
"hi",
"<",
"=",
"l",
".",
"firstIndex",
"+",
"len",
"(",
"l",
".",
"entries",
")"
] | [
"func",
"(",
"l",
"*",
"raftLog",
")",
"mustCheckOutOfBounds",
"(",
"lo",
",",
"hi",
"uint64",
")",
"error",
"{",
"if",
"lo",
">",
"hi",
"{",
"l",
".",
"logger",
".",
"Panicf",
"(",
"\"",
"\"",
",",
"lo",
",",
"hi",
")",
"\n",
"}",
"\n",
"fi",
... |
20,414 | all-20415 | [
"NewClient",
"establishes",
"a",
"new",
"Client",
"connection",
"based",
"on",
"a",
"set",
"of",
"Options",
"."
] | [
"func",
"(",
"o",
"Options",
")",
"NewClient",
"(",
")",
"(",
"*",
"Client",
",",
"error",
")",
"{",
"host",
":=",
"o",
".",
"Host",
"\n",
"c",
",",
"err",
":=",
"connect",
"(",
"<mask>",
",",
"o",
".",
"User",
",",
"o",
".",
"Password",
")",
... |
20,415 | all-20416 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"StartViolationsReportParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoLog2",
"(",
"&",
"w",
",",
"v",
... |
20,416 | all-20417 | [
"AliasForSpec",
"determines",
"the",
"GCS",
"path",
"aliases",
"for",
"a",
"job",
"spec"
] | [
"func",
"AliasForSpec",
"(",
"<mask>",
"*",
"downwardapi",
".",
"JobSpec",
")",
"string",
"{",
"switch",
"spec",
".",
"Type",
"{",
"case",
"prowapi",
".",
"PeriodicJob",
",",
"prowapi",
".",
"PostsubmitJob",
",",
"prowapi",
".",
"BatchJob",
":",
"return",
... |
20,417 | all-20418 | [
"GetLabel",
"is",
"a",
"wrapper",
"around",
"gtk_tool_button_get_label",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"ToolButton",
")",
"GetLabel",
"(",
")",
"<mask>",
"{",
"c",
":=",
"C",
".",
"gtk_tool_button_get_label",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"return",
"goString",
"(",
"c",
")",
"\n",
"}"
] |
20,418 | all-20419 | [
"SetEndpoints",
"updates",
"client",
"s",
"endpoints",
"."
] | [
"func",
"(",
"c",
"*",
"<mask>",
")",
"SetEndpoints",
"(",
"eps",
"...",
"string",
")",
"{",
"c",
".",
"mu",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"mu",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"cfg",
".",
"Endpoints",
"=",
"eps",
"... |
20,419 | all-20420 | [
"imports",
"returns",
"a",
"map",
"of",
"all",
"import",
"directories",
"(",
"recursively",
")",
"used",
"by",
"the",
"app",
".",
"The",
"return",
"value",
"maps",
"full",
"directory",
"names",
"to",
"original",
"import",
"names",
"."
] | [
"func",
"imports",
"(",
"ctxt",
"*",
"build",
".",
"Context",
",",
"srcDir",
"string",
",",
"gopath",
"[",
"]",
"string",
")",
"(",
"map",
"[",
"string",
"]",
"string",
",",
"error",
")",
"{",
"pkg",
",",
"err",
":=",
"ctxt",
".",
"ImportDir",
"(",... |
20,420 | all-20421 | [
"CancelRotateSecret",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockSecretsManagerAPI",
")",
"CancelRotateSecret",
"(",
"arg0",
"*",
"secretsmanager",
".",
"CancelRotateSecretInput",
")",
"(",
"*",
"secretsmanager",
".",
"CancelRotateSecretOutput",
",",
"error",
")",
"{",
"ret",
":=",
"m",
".",
"ctrl"... |
20,421 | all-20422 | [
"newOpenshiftClient",
"creates",
"a",
"new",
"openshiftClient",
"for",
"the",
"specified",
"reference",
"."
] | [
"func",
"newOpenshiftClient",
"(",
"ref",
"openshiftReference",
")",
"(",
"*",
"openshiftClient",
",",
"error",
")",
"{",
"// We have already done this parsing in ParseReference, but thrown away",
"// httpClient. So, parse again.",
"// (We could also rework/split restClientFor to \"get... |
20,422 | all-20423 | [
"NewClient",
"returns",
"a",
"configured",
"Rundeck",
"client",
"."
] | [
"func",
"NewClient",
"(",
"config",
"*",
"ClientConfig",
")",
"(",
"*",
"Client",
",",
"error",
")",
"{",
"t",
":=",
"&",
"http",
".",
"Transport",
"{",
"TLSClientConfig",
":",
"&",
"tls",
".",
"Config",
"{",
"InsecureSkipVerify",
":",
"config",
".",
"... |
20,423 | all-20424 | [
"MustChangeTrustResult",
"retrieves",
"the",
"ChangeTrustResult",
"value",
"from",
"the",
"union",
"panicing",
"if",
"the",
"value",
"is",
"not",
"set",
"."
] | [
"func",
"(",
"u",
"OperationResultTr",
")",
"MustChangeTrustResult",
"(",
")",
"ChangeTrustResult",
"{",
"val",
",",
"ok",
":=",
"u",
".",
"GetChangeTrustResult",
"(",
")",
"\n\n",
"if",
"!",
"<mask>",
"{",
"panic",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n... |
20,424 | all-20425 | [
"ExtractWriter",
"extracts",
"all",
"cluster",
"state",
"and",
"marshals",
"it",
"to",
"w",
"."
] | [
"func",
"(",
"c",
"APIClient",
")",
"ExtractWriter",
"(",
"objects",
"bool",
",",
"w",
"io",
".",
"Writer",
")",
"error",
"{",
"<mask>",
":=",
"pbutil",
".",
"NewWriter",
"(",
"w",
")",
"\n",
"return",
"c",
".",
"Extract",
"(",
"objects",
",",
"func"... |
20,425 | all-20426 | [
"shrinkStates",
"shrinks",
"the",
"state",
"list",
"down",
"to",
"size",
"states"
] | [
"func",
"(",
"c",
"*",
"context",
")",
"shrinkStates",
"(",
"states",
"[",
"]",
"state",
",",
"size",
"int",
")",
"[",
"]",
"state",
"{",
"i1",
":=",
"units2Index",
"[",
"(",
"len",
"(",
"states",
")",
"+",
"1",
")",
">>",
"1",
"]",
"\n",
"i2",... |
20,426 | all-20427 | [
"Wait",
"blocks",
"on",
"the",
"barrier",
"key",
"until",
"it",
"is",
"deleted",
".",
"If",
"there",
"is",
"no",
"key",
"Wait",
"assumes",
"Release",
"has",
"already",
"been",
"called",
"and",
"returns",
"immediately",
"."
] | [
"func",
"(",
"b",
"*",
"Barrier",
")",
"Wait",
"(",
")",
"error",
"{",
"resp",
",",
"err",
":=",
"b",
".",
"client",
".",
"Get",
"(",
"b",
".",
"ctx",
",",
"b",
".",
"key",
",",
"v3",
".",
"WithFirstKey",
"(",
")",
"...",
")",
"\n",
"if",
"... |
20,427 | all-20428 | [
"Run",
"user",
"error",
"code",
"and",
"return",
"the",
"combined",
"output",
"of",
"stdout",
"and",
"stderr",
"."
] | [
"func",
"(",
"a",
"*",
"APIServer",
")",
"runUserErrorHandlingCode",
"(",
"ctx",
"context",
".",
"Context",
",",
"logger",
"*",
"taggedLogger",
",",
"environ",
"[",
"]",
"string",
",",
"stats",
"*",
"pps",
".",
"ProcessStats",
",",
"rawDatumTimeout",
"*",
... |
20,428 | all-20429 | [
"UnmarshalJSON",
"implements",
"the",
"json",
".",
"Unmarshaler",
"interface",
"."
] | [
"func",
"(",
"pr",
"*",
"prSignedBaseLayer",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"*",
"pr",
"=",
"prSignedBaseLayer",
"{",
"}",
"\n",
"var",
"tmp",
"prSignedBaseLayer",
"\n",
"<mask>",
"baseLayerIdentity",
"json",
".",
"... |
20,429 | all-20430 | [
"GetIPV6Addresses",
"returns",
"a",
"list",
"of",
"ipv6",
"addresses",
"allocated",
"to",
"the",
"ENI"
] | [
"func",
"(",
"eni",
"*",
"ENI",
")",
"GetIPV6Addresses",
"(",
")",
"[",
"]",
"string",
"{",
"var",
"addresses",
"[",
"]",
"string",
"\n",
"for",
"_",
",",
"addr",
":=",
"range",
"eni",
".",
"IPV6Addresses",
"{",
"addresses",
"=",
"<mask>",
"(",
"addr... |
20,430 | all-20431 | [
"Returns",
"true",
"if",
"x",
"runes",
"would",
"fit",
"into",
"RV",
"."
] | [
"func",
"(",
"w",
"*",
"SnowballWord",
")",
"FitsInRV",
"(",
"x",
"int",
")",
"bool",
"{",
"<mask>",
"w",
".",
"RVstart",
"<=",
"len",
"(",
"w",
".",
"RS",
")",
"-",
"x",
"\n",
"}"
] |
20,431 | all-20432 | [
"To",
"returns",
"a",
"copy",
"of",
"MailBuilder",
"with",
"this",
"name",
"&",
"address",
"appended",
"to",
"the",
"To",
"header",
".",
"name",
"may",
"be",
"empty",
"."
] | [
"func",
"(",
"p",
"MailBuilder",
")",
"To",
"(",
"name",
",",
"addr",
"string",
")",
"MailBuilder",
"{",
"p",
".",
"to",
"=",
"append",
"(",
"p",
".",
"to",
",",
"mail",
".",
"Address",
"{",
"Name",
":",
"<mask>",
",",
"Address",
":",
"addr",
"}"... |
20,432 | all-20433 | [
"BuildPathHelper",
"Builds",
"a",
"routeHelperfunc",
"for",
"a",
"particular",
"RouteInfo"
] | [
"func",
"(",
"ri",
"*",
"RouteInfo",
")",
"BuildPathHelper",
"(",
")",
"RouteHelperFunc",
"{",
"cRoute",
":=",
"ri",
"\n",
"return",
"func",
"(",
"opts",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"(",
"template",
".",
"HTML",
",",
"error",... |
20,433 | all-20434 | [
"retrieve",
"the",
"name",
"of",
"an",
"active",
"uniform",
"block"
] | [
"func",
"GetActiveUniformBlockName",
"(",
"program",
"uint32",
",",
"uniformBlockIndex",
"uint32",
",",
"bufSize",
"int32",
",",
"length",
"*",
"int32",
",",
"uniformBlockName",
"*",
"uint8",
")",
"{",
"C",
".",
"glowGetActiveUniformBlockName",
"(",
"gpGetActiveUnif... |
20,434 | all-20435 | [
"WaitIO",
"is",
"a",
"helper",
"function",
"and",
"the",
"reason",
"we",
"forked",
"this",
"package",
"from",
"stdlib",
".",
"This",
"way",
"we",
"can",
"manually",
"close",
"IO",
"when",
"c",
".",
"Process",
".",
"Wait",
"()",
"has",
"already",
"been",
... | [
"func",
"(",
"c",
"*",
"Cmd",
")",
"WaitIO",
"(",
"<mask>",
"*",
"os",
".",
"ProcessState",
",",
"err",
"error",
")",
"(",
"retErr",
"error",
")",
"{",
"if",
"c",
".",
"waitDone",
"!=",
"nil",
"{",
"close",
"(",
"c",
".",
"waitDone",
")",
"\n",
... |
20,435 | all-20436 | [
"CanAuthenticate",
"makes",
"a",
"test",
"request",
"to",
"CM",
"1",
".",
"5",
"and",
"returns",
"true",
"if",
"it",
"is",
"successful",
"."
] | [
"func",
"(",
"s",
"*",
"cookieSigner",
")",
"CanAuthenticate",
"(",
"host",
"string",
")",
"error",
"{",
"_",
",",
"<mask>",
":=",
"s",
".",
"builder",
".",
"(",
"*",
"instanceLoginRequestBuilder",
")",
"\n",
"return",
"testAuth",
"(",
"s",
",",
"s",
"... |
20,436 | all-20437 | [
"Constructs",
"a",
"*",
"TypeInfo",
"automatically",
"not",
"from",
"registration",
"."
] | [
"func",
"(",
"cdc",
"*",
"Codec",
")",
"newTypeInfoUnregistered",
"(",
"rt",
"reflect",
".",
"Type",
")",
"*",
"TypeInfo",
"{",
"if",
"rt",
".",
"Kind",
"(",
")",
"==",
"reflect",
".",
"Ptr",
"{",
"panic",
"(",
"\"",
"\"",
")",
"// should not happen.",... |
20,437 | all-20438 | [
"Discrete",
"implements",
"instruments",
".",
"Reporter"
] | [
"func",
"(",
"r",
"*",
"Reporter",
")",
"Discrete",
"(",
"name",
"string",
",",
"tags",
"[",
"]",
"string",
",",
"val",
"float64",
")",
"error",
"{",
"metricID",
":=",
"instruments",
".",
"MetricID",
"(",
"<mask>",
",",
"tags",
")",
"\n",
"r",
".",
... |
20,438 | all-20439 | [
"Merge",
"will",
"fill",
"any",
"empty",
"for",
"value",
"type",
"attributes",
"on",
"the",
"dst",
"struct",
"using",
"corresponding",
"src",
"attributes",
"if",
"they",
"themselves",
"are",
"not",
"empty",
".",
"dst",
"and",
"src",
"must",
"be",
"valid",
... | [
"func",
"Merge",
"(",
"dst",
",",
"src",
"<mask>",
"{",
"}",
",",
"opts",
"...",
"func",
"(",
"*",
"Config",
")",
")",
"error",
"{",
"return",
"merge",
"(",
"dst",
",",
"src",
",",
"opts",
"...",
")",
"\n",
"}"
] |
20,439 | all-20440 | [
"FromRawSeed",
"creates",
"a",
"new",
"keypair",
"from",
"the",
"provided",
"raw",
"ED25519",
"seed",
":",
"w"
] | [
"func",
"FromRawSeed",
"(",
"rawSeed",
"[",
"32",
"]",
"<mask>",
")",
"(",
"*",
"Full",
",",
"error",
")",
"{",
"seed",
",",
"err",
":=",
"strkey",
".",
"Encode",
"(",
"strkey",
".",
"VersionByteSeed",
",",
"rawSeed",
"[",
":",
"]",
")",
"\n",
"if"... |
20,440 | all-20441 | [
"AssignChildren",
"assigns",
"the",
"list",
"of",
"given",
"child",
"Identifiables",
"to",
"the",
"given",
"Identifiable",
"parent",
"in",
"the",
"server",
"."
] | [
"func",
"(",
"s",
"*",
"Session",
")",
"AssignChildren",
"(",
"parent",
"Identifiable",
",",
"children",
"[",
"]",
"Identifiable",
",",
"identity",
"Identity",
")",
"*",
"Error",
"{",
"url",
",",
"berr",
":=",
"s",
".",
"getURLForChildrenIdentity",
"(",
"p... |
20,441 | all-20442 | [
"DeleteCheckoutKey",
"fetches",
"the",
"checkout",
"key",
"for",
"the",
"given",
"project",
"by",
"fingerprint"
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"DeleteCheckoutKey",
"(",
"account",
",",
"repo",
",",
"fingerprint",
"string",
")",
"error",
"{",
"return",
"c",
".",
"<mask>",
"(",
"\"",
"\"",
",",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"account",
",",
... |
20,442 | all-20443 | [
"HasSizing",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"i",
"*",
"ImageDefinition",
")",
"HasSizing",
"(",
")",
"bool",
"{",
"if",
"i",
"!=",
"nil",
"&&",
"i",
".",
"Sizing",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
20,443 | all-20444 | [
"Do",
"executes",
"Overlay",
".",
"setShowDebugBorders",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"SetShowDebugBordersParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"<mask>",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandSetShowDebugBorders",
",",
"p",
",",
"nil",
")",
"\n",
"}... |
20,444 | all-20445 | [
"IsFatal",
"implements",
"the",
"driver",
".",
"Error",
"interface",
"."
] | [
"func",
"(",
"e",
"*",
"hdbErrors",
")",
"IsFatal",
"(",
")",
"bool",
"{",
"return",
"e",
".",
"<mask>",
"[",
"e",
".",
"idx",
"]",
".",
"errorLevel",
"==",
"errorLevelFatalError",
"\n",
"}"
] |
20,445 | all-20446 | [
"Offset",
"returns",
"the",
"byte",
"offset",
"for",
"the",
"given",
"field"
] | [
"func",
"(",
"t",
"*",
"Tuple",
")",
"Offset",
"(",
"field",
"string",
")",
"(",
"int",
",",
"error",
")",
"{",
"index",
",",
"exists",
":=",
"t",
".",
"Header",
".",
"Type",
".",
"Offset",
"(",
"field",
")",
"\n",
"if",
"!",
"exists",
"{",
"re... |
20,446 | all-20447 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"GetCurrentTimeReturns",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation11",
"(",
... |
20,447 | all-20448 | [
"AppendEntriesPipeline",
"returns",
"an",
"interface",
"that",
"can",
"be",
"used",
"to",
"pipeline",
"AppendEntries",
"requests",
"."
] | [
"func",
"(",
"t",
"*",
"transport",
")",
"AppendEntriesPipeline",
"(",
"id",
"raft",
".",
"ServerID",
",",
"target",
"raft",
".",
"ServerAddress",
")",
"(",
"raft",
".",
"AppendPipeline",
",",
"error",
")",
"{",
"p",
":=",
"&",
"pipeline",
"{",
"t",
":... |
20,448 | all-20449 | [
"Actual",
"returns",
"the",
"actual",
"resource",
"group",
"in",
"Azure",
"if",
"it",
"exists",
"."
] | [
"func",
"(",
"r",
"*",
"ResourceGroup",
")",
"Actual",
"(",
"immutable",
"*",
"cluster",
".",
"Cluster",
")",
"(",
"*",
"cluster",
".",
"Cluster",
",",
"cloud",
".",
"Resource",
",",
"error",
")",
"{",
"logger",
".",
"Debug",
"(",
"\"",
"\"",
")",
... |
20,449 | all-20450 | [
"synchronizeState",
"goes",
"through",
"all",
"the",
"containers",
"on",
"the",
"instance",
"to",
"synchronize",
"the",
"state",
"on",
"agent",
"start"
] | [
"func",
"(",
"engine",
"*",
"DockerStatsEngine",
")",
"synchronizeState",
"(",
")",
"error",
"{",
"listContainersResponse",
":=",
"<mask>",
".",
"client",
".",
"ListContainers",
"(",
"engine",
".",
"ctx",
",",
"false",
",",
"dockerclient",
".",
"ListContainersTi... |
20,450 | all-20451 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"GetRealtimeDataReturns",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio",
"(",
"&",
"w",
",",
"v",... |
20,451 | all-20452 | [
"IsBlocked",
"returns",
"a",
"boolean",
"value",
"indicating",
"whether",
"there",
"is",
"a",
"block",
"at",
"position",
"(",
"x",
"y",
")",
"on",
"the",
"field",
"."
] | [
"func",
"(",
"f",
"*",
"Field",
")",
"IsBlocked",
"(",
"x",
",",
"y",
"int",
")",
"bool",
"{",
"if",
"x",
"<",
"0",
"||",
"fieldBlockNumX",
"<=",
"x",
"{",
"return",
"true",
"\n",
"}",
"\n",
"if",
"y",
"<",
"0",
"{",
"return",
"false",
"\n",
... |
20,452 | all-20453 | [
"exprN",
"lowers",
"a",
"multi",
"-",
"result",
"expression",
"e",
"to",
"SSA",
"form",
"emitting",
"code",
"to",
"fn",
"and",
"returning",
"a",
"single",
"Value",
"whose",
"type",
"is",
"a",
"*",
"types",
".",
"Tuple",
".",
"The",
"caller",
"must",
"a... | [
"func",
"(",
"b",
"*",
"builder",
")",
"exprN",
"(",
"fn",
"*",
"Function",
",",
"e",
"ast",
".",
"Expr",
")",
"Value",
"{",
"typ",
":=",
"fn",
".",
"Pkg",
".",
"typeOf",
"(",
"e",
")",
".",
"(",
"*",
"types",
".",
"Tuple",
")",
"\n",
"switch... |
20,453 | all-20454 | [
"IsFailure",
"means",
"the",
"job",
"completed",
"with",
"problems",
"."
] | [
"func",
"(",
"jb",
"*",
"Build",
")",
"IsFailure",
"(",
")",
"bool",
"{",
"return",
"jb",
".",
"Result",
"!=",
"nil",
"&&",
"(",
"*",
"jb",
".",
"<mask>",
"==",
"failure",
"||",
"*",
"jb",
".",
"Result",
"==",
"unstable",
")",
"\n",
"}"
] |
20,454 | all-20455 | [
"Also",
"for",
"arrays",
".",
"TODO",
":",
"Create",
"special",
"function",
"for",
"arrays?"
] | [
"func",
"copyTableToSlice",
"(",
"L",
"*",
"lua",
".",
"State",
",",
"idx",
"int",
",",
"v",
"reflect",
".",
"Value",
",",
"visited",
"map",
"[",
"uintptr",
"]",
"reflect",
".",
"Value",
")",
"(",
"status",
"error",
")",
"{",
"t",
":=",
"v",
".",
... |
20,455 | all-20456 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"SetBypassCSPParams",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage13",
"(",
"&",
"... |
20,456 | all-20457 | [
"Deny",
"deny",
"permission",
"mode",
"for",
"roles"
] | [
"func",
"Deny",
"(",
"<mask>",
"PermissionMode",
",",
"roles",
"...",
"string",
")",
"*",
"Permission",
"{",
"return",
"Global",
".",
"Deny",
"(",
"mode",
",",
"roles",
"...",
")",
"\n",
"}"
] |
20,457 | all-20458 | [
"An",
"instance",
"will",
"report",
"in",
"by",
"giving",
"its",
"instance",
"id",
"as",
"well",
"as",
"its",
"security",
"token",
".",
"The",
"token",
"is",
"given",
"and",
"checked",
"to",
"ensure",
"that",
"it",
"matches",
"a",
"real",
"token",
"that"... | [
"func",
"(",
"awsProvisioner",
"*",
"AwsProvisioner",
")",
"InstanceStarted",
"(",
"instanceId",
",",
"token",
"string",
")",
"error",
"{",
"cd",
":=",
"tcclient",
".",
"Client",
"(",
"*",
"awsProvisioner",
")",
"\n",
"_",
",",
"_",
",",
"err",
":=",
"("... |
20,458 | all-20459 | [
"When",
"the",
"request",
"entered",
"the",
"timer",
"middleware",
"."
] | [
"func",
"(",
"u",
"*",
"accessLogUtil",
")",
"StartTime",
"(",
")",
"*",
"time",
".",
"Time",
"{",
"if",
"u",
".",
"R",
".",
"Env",
"[",
"\"",
"\"",
"]",
"!=",
"nil",
"{",
"return",
"u",
".",
"R",
".",
"Env",
"[",
"\"",
"\"",
"]",
".",
"(",... |
20,459 | all-20460 | [
"vAppSubresourceSchema",
"represents",
"the",
"schema",
"for",
"the",
"vApp",
"sub",
"-",
"resource",
".",
"This",
"sub",
"-",
"resource",
"allows",
"the",
"customization",
"of",
"vApp",
"properties",
"on",
"cloned",
"VMs",
"."
] | [
"func",
"vAppSubresourceSchema",
"(",
")",
"map",
"[",
"string",
"]",
"*",
"schema",
".",
"Schema",
"{",
"return",
"map",
"[",
"string",
"]",
"*",
"schema",
".",
"Schema",
"{",
"\"",
"\"",
":",
"{",
"Type",
":",
"schema",
".",
"TypeMap",
",",
"Option... |
20,460 | all-20461 | [
"UnmarshalJSON",
"overrides",
"the",
"logic",
"for",
"parsing",
"the",
"JSON",
"-",
"encoded",
"ContainerStatus",
"data"
] | [
"func",
"(",
"cs",
"*",
"ContainerStatus",
")",
"UnmarshalJSON",
"(",
"b",
"[",
"]",
"byte",
")",
"error",
"{",
"if",
"strings",
".",
"ToLower",
"(",
"string",
"(",
"b",
")",
")",
"==",
"\"",
"\"",
"{",
"*",
"cs",
"=",
"ContainerStatusNone",
"\n",
... |
20,461 | all-20462 | [
"LayerInfosForCopy",
"()",
"returns",
"the",
"list",
"of",
"layer",
"blobs",
"that",
"make",
"up",
"the",
"root",
"filesystem",
"of",
"the",
"image",
"after",
"they",
"ve",
"been",
"decompressed",
"."
] | [
"func",
"(",
"s",
"*",
"storageImageSource",
")",
"LayerInfosForCopy",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"[",
"]",
"types",
".",
"BlobInfo",
",",
"error",
")",
"{",
"manifestBlob",
",",
"manifestType",
",",
"err",
":=",
"s",
".",
"GetManif... |
20,462 | all-20463 | [
"get",
"IP",
"type",
"and",
"calculate",
"IP",
"number",
";",
"calculates",
"index",
"too",
"if",
"exists"
] | [
"func",
"checkip",
"(",
"ip",
"string",
")",
"(",
"iptype",
"uint32",
",",
"ipnum",
"*",
"big",
".",
"Int",
",",
"ipindex",
"uint32",
")",
"{",
"iptype",
"=",
"0",
"\n",
"ipnum",
"=",
"big",
".",
"NewInt",
"(",
"0",
")",
"\n",
"ipnumtmp",
":=",
"... |
20,463 | all-20464 | [
"New",
"generates",
"a",
"new",
"AccessToken",
"with",
"the",
"specified",
"properties",
".",
"identity",
"is",
"a",
"unique",
"ID",
"for",
"a",
"particular",
"user",
".",
"To",
"generate",
"an",
"apiKey",
"and",
"apiSecret",
"follow",
"this",
"instructions",
... | [
"func",
"New",
"(",
"accountSid",
",",
"apiKey",
",",
"apiSecret",
",",
"identity",
"string",
",",
"ttl",
"time",
".",
"Duration",
")",
"*",
"AccessToken",
"{",
"return",
"&",
"AccessToken",
"{",
"accountSid",
":",
"accountSid",
",",
"apiKey",
":",
"apiKey... |
20,464 | all-20465 | [
"Next",
"advances",
"the",
"parser",
"to",
"the",
"next",
"sample",
".",
"It",
"returns",
"false",
"if",
"no",
"more",
"samples",
"were",
"read",
"or",
"an",
"error",
"occurred",
"."
] | [
"func",
"(",
"p",
"*",
"PromParser",
")",
"Next",
"(",
")",
"(",
"Entry",
",",
"error",
")",
"{",
"var",
"err",
"error",
"\n\n",
"p",
".",
"start",
"=",
"p",
".",
"l",
".",
"i",
"\n",
"p",
".",
"offsets",
"=",
"p",
".",
"offsets",
"[",
":",
... |
20,465 | all-20466 | [
"Handle",
"the",
"transition",
"between",
"net",
"/",
"http",
"and",
"go",
"-",
"json",
"-",
"rest",
"objects",
".",
"It",
"intanciates",
"the",
"rest",
".",
"Request",
"and",
"rest",
".",
"ResponseWriter",
"..."
] | [
"func",
"adapterFunc",
"(",
"handler",
"HandlerFunc",
")",
"http",
".",
"HandlerFunc",
"{",
"return",
"func",
"(",
"origWriter",
"http",
".",
"ResponseWriter",
",",
"origRequest",
"*",
"http",
".",
"<mask>",
")",
"{",
"// instantiate the rest objects",
"request",
... |
20,466 | all-20467 | [
"RequireHTTPMethods",
"wraps",
"a",
"given",
"handler",
"function",
"inside",
"an",
"HTTP",
"method",
"validating",
"handler",
"."
] | [
"func",
"(",
"s",
"*",
"Server",
")",
"RequireHTTPMethods",
"(",
"logger",
"log",
".",
"Logger",
",",
"handler",
"HandlerFunc",
",",
"methods",
"...",
"string",
")",
"HandlerFunc",
"{",
"l",
":=",
"logger",
".",
"Add",
"(",
"\"",
"\"",
",",
"\"",
"\"",... |
20,467 | all-20468 | [
"See",
"bcd",
".",
"Tracer",
".",
"AddFaultedThread",
"()",
"."
] | [
"func",
"(",
"t",
"*",
"BTTracer",
")",
"AddFaultedThread",
"(",
"options",
"[",
"]",
"string",
",",
"tid",
"int",
")",
"[",
"]",
"string",
"{",
"return",
"t",
".",
"AddOptions",
"(",
"<mask>",
",",
"\"",
"\"",
",",
"strconv",
".",
"Itoa",
"(",
"ti... |
20,468 | all-20469 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"TraceConfig",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing",
"(",
"&",
"r",
",... |
20,469 | all-20470 | [
"newApplySource",
"will",
"create",
"a",
"new",
"source",
"any",
"source",
"created",
"with",
"the",
"same",
"seed",
"will",
"generate",
"the",
"same",
"sequence",
"of",
"data",
"."
] | [
"func",
"newApplySource",
"(",
"<mask>",
"string",
")",
"*",
"applySource",
"{",
"h",
":=",
"fnv",
".",
"New32",
"(",
")",
"\n",
"h",
".",
"Write",
"(",
"[",
"]",
"byte",
"(",
"seed",
")",
")",
"\n",
"s",
":=",
"&",
"applySource",
"{",
"seed",
":... |
20,470 | all-20471 | [
"Cast",
"the",
"region",
"to",
"the",
"given",
"type",
"."
] | [
"func",
"(",
"r",
"<mask>",
")",
"Cast",
"(",
"typ",
"string",
")",
"region",
"{",
"return",
"region",
"{",
"p",
":",
"r",
".",
"p",
",",
"a",
":",
"r",
".",
"a",
",",
"typ",
":",
"r",
".",
"p",
".",
"findType",
"(",
"typ",
")",
"}",
"\n",
... |
20,471 | all-20472 | [
"computeID",
"computes",
"a",
"recommended",
"image",
"ID",
"based",
"on",
"information",
"we",
"have",
"so",
"far",
".",
"If",
"the",
"manifest",
"is",
"not",
"of",
"a",
"type",
"that",
"we",
"recognize",
"we",
"return",
"an",
"empty",
"value",
"indicatin... | [
"func",
"(",
"s",
"*",
"storageImageDestination",
")",
"computeID",
"(",
"m",
"manifest",
".",
"Manifest",
")",
"string",
"{",
"// Build the diffID list. We need the decompressed sums that we've been calculating to",
"// fill in the DiffIDs. It's expected (but not enforced by us) t... |
20,472 | all-20473 | [
"WithKey",
"unique",
"DOM",
"defined",
"string",
"value",
"describing",
"the",
"meaning",
"of",
"the",
"key",
"in",
"the",
"context",
"of",
"active",
"modifiers",
"keyboard",
"layout",
"etc",
"(",
"e",
".",
"g",
".",
"AltGr",
")",
"(",
"default",
":",
")... | [
"func",
"(",
"p",
"DispatchKeyEventParams",
")",
"WithKey",
"(",
"<mask>",
"string",
")",
"*",
"DispatchKeyEventParams",
"{",
"p",
".",
"Key",
"=",
"key",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
20,473 | all-20474 | [
"ages",
"return",
"the",
"age",
"of",
"each",
"active",
"states"
] | [
"func",
"(",
"b",
"BundledStates",
")",
"ages",
"(",
"t",
"time",
".",
"Time",
")",
"map",
"[",
"string",
"]",
"time",
".",
"Duration",
"{",
"ages",
":=",
"map",
"[",
"string",
"]",
"time",
".",
"Duration",
"{",
"}",
"\n\n",
"for",
"id",
",",
"st... |
20,474 | all-20475 | [
"GetEventSizeOk",
"returns",
"a",
"tuple",
"with",
"the",
"EventSize",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"e",
"*",
"EventStreamDefinition",
")",
"GetEventSizeOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"e",
"==",
"nil",
"||",
"e",
".",
"EventSize",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"retu... |
20,475 | all-20476 | [
"openSnapshotBackend",
"renames",
"a",
"snapshot",
"db",
"to",
"the",
"current",
"etcd",
"db",
"and",
"opens",
"it",
"."
] | [
"func",
"openSnapshotBackend",
"(",
"cfg",
"ServerConfig",
",",
"ss",
"*",
"snap",
".",
"Snapshotter",
",",
"snapshot",
"raftpb",
".",
"Snapshot",
")",
"(",
"backend",
".",
"Backend",
",",
"error",
")",
"{",
"snapPath",
",",
"err",
":=",
"<mask>",
".",
"... |
20,476 | all-20477 | [
"hardStopPipeline",
"does",
"essentially",
"the",
"same",
"thing",
"as",
"StopPipeline",
"(",
"deletes",
"the",
"pipeline",
"s",
"branch",
"provenance",
"deletes",
"any",
"open",
"commits",
"deletes",
"any",
"k8s",
"workers",
")",
"but",
"does",
"it",
"immediate... | [
"func",
"(",
"a",
"*",
"apiServer",
")",
"hardStopPipeline",
"(",
"pachClient",
"*",
"client",
".",
"APIClient",
",",
"pipelineInfo",
"*",
"pps",
".",
"PipelineInfo",
")",
"error",
"{",
"// Remove the output branch's provenance so that no new jobs can be created",
"if",... |
20,477 | all-20478 | [
"EndUserLocator",
"builds",
"a",
"locator",
"from",
"the",
"given",
"href",
"."
] | [
"func",
"(",
"api",
"*",
"API",
")",
"EndUserLocator",
"(",
"href",
"<mask>",
")",
"*",
"EndUserLocator",
"{",
"return",
"&",
"EndUserLocator",
"{",
"Href",
"(",
"href",
")",
",",
"api",
"}",
"\n",
"}"
] |
20,478 | all-20479 | [
"GenerateRandomBytes",
"..."
] | [
"func",
"GenerateRandomBytes",
"(",
"length",
"int",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"b",
":=",
"make",
"(",
"[",
"]",
"byte",
",",
"length",
")",
"\n\n",
"_",
",",
"err",
":=",
"<mask>",
".",
"Read",
"(",
"b",
")",
"\n\n",
... |
20,479 | all-20480 | [
"NewReader",
"returns",
"a",
"new",
"LZ4",
"frame",
"decoder",
".",
"No",
"access",
"to",
"the",
"underlying",
"io",
".",
"Reader",
"is",
"performed",
"."
] | [
"func",
"NewReader",
"(",
"src",
"<mask>",
".",
"Reader",
")",
"*",
"Reader",
"{",
"r",
":=",
"&",
"Reader",
"{",
"src",
":",
"src",
"}",
"\n",
"return",
"r",
"\n",
"}"
] |
20,480 | all-20481 | [
"Stop",
"-",
"signal",
"for",
"the",
"service",
"to",
"stop",
"serving"
] | [
"func",
"(",
"server",
"*",
"Server",
")",
"Stop",
"(",
")",
"{",
"service",
":=",
"server",
".",
"service",
"\n",
"if",
"service",
".",
"<mask>",
"{",
"service",
".",
"wg",
".",
"Done",
"(",
")",
"\n",
"service",
".",
"started",
"=",
"false",
"\n"... |
20,481 | all-20482 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"EventPseudoElementRemoved",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom58",
"(",
"&",
"w",
",",
"v",... |
20,482 | all-20483 | [
"title",
":",
"rollback",
"platform",
"path",
":",
"/",
"platforms",
"/",
"{",
"name",
"}",
"/",
"rollback",
"method",
":",
"POST",
"produce",
":",
"application",
"/",
"x",
"-",
"json",
"-",
"stream",
"responses",
":",
"200",
":",
"OK",
"400",
":",
"... | [
"func",
"platformRollback",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"t",
"auth",
".",
"Token",
")",
"(",
"err",
"error",
")",
"{",
"name",
":=",
"r",
".",
"URL",
".",
"Query",
"(",
")",
".",
"Get",
"("... |
20,483 | all-20484 | [
"/",
"*",
".",
"db",
"a",
"reference",
"to",
"a",
"sql",
".",
"DB",
"instance",
".",
"q",
"is",
"the",
"database",
"query",
".",
"inargs",
"is",
"an",
"array",
"of",
"interfaces",
"containing",
"the",
"query",
"arguments",
".",
"outfmt",
"is",
"an",
... | [
"func",
"queryScan",
"(",
"<mask>",
"*",
"sql",
".",
"DB",
",",
"q",
"string",
",",
"inargs",
"[",
"]",
"interface",
"{",
"}",
",",
"outfmt",
"[",
"]",
"interface",
"{",
"}",
")",
"(",
"[",
"]",
"[",
"]",
"interface",
"{",
"}",
",",
"error",
")... |
20,484 | all-20485 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"FontFace",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss50",
"(",
"&",
"r",
",",
... |
20,485 | all-20486 | [
"New",
"returns",
"a",
"instance",
"of",
"oort",
".",
"Server",
"for",
"a",
"given",
"serviceName",
"workingDir",
"and",
"buildVersion",
".",
"if",
"workingDir",
"is",
"empty",
"the",
"default",
"dir",
"of",
"/",
"var",
"/",
"lib",
"/",
"<servicename",
">"... | [
"func",
"New",
"(",
"serviceName",
",",
"workingDir",
"string",
",",
"binaryUpdater",
"*",
"cmdctrl",
".",
"GithubUpdater",
")",
"(",
"*",
"Server",
",",
"error",
")",
"{",
"if",
"workingDir",
"==",
"\"",
"\"",
"{",
"workingDir",
"=",
"fmt",
".",
"Sprint... |
20,486 | all-20487 | [
"SetKnownExitCode",
"sets",
"exit",
"code",
"field",
"in",
"container",
"struct"
] | [
"func",
"(",
"c",
"*",
"Container",
")",
"SetKnownExitCode",
"(",
"i",
"*",
"int",
")",
"{",
"c",
".",
"<mask>",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n\n",
"c",
".",
"KnownExitCodeUnsafe",
"=",
"i",
"... |
20,487 | all-20488 | [
"newAuthTokenFileRoundTripper",
"adds",
"the",
"auth",
"token",
"read",
"from",
"the",
"file",
"to",
"a",
"request",
"."
] | [
"func",
"newAuthTokenFileRoundTripper",
"(",
"tokenFile",
"string",
",",
"rt",
"http",
".",
"RoundTripper",
")",
"(",
"http",
".",
"RoundTripper",
",",
"error",
")",
"{",
"// fail-fast if we can't read the file.",
"_",
",",
"err",
":=",
"ioutil",
".",
"ReadFile",
... |
20,488 | all-20489 | [
"StringIn",
"is",
"a",
"convenience",
"function",
"that",
"returns",
"true",
"if",
"str",
"matches",
"any",
"of",
"the",
"values",
"."
] | [
"func",
"StringIn",
"(",
"str",
"string",
",",
"<mask>",
"...",
"string",
")",
"bool",
"{",
"for",
"_",
",",
"val",
":=",
"range",
"values",
"{",
"if",
"str",
"==",
"val",
"{",
"return",
"true",
"\n",
"}",
"\n",
"}",
"\n",
"return",
"false",
"\n",
... |
20,489 | all-20490 | [
"VisitInput",
"visits",
"each",
"input",
"recursively",
"in",
"ascending",
"order",
"(",
"root",
"last",
")"
] | [
"func",
"VisitInput",
"(",
"input",
"*",
"Input",
",",
"f",
"func",
"(",
"*",
"Input",
")",
")",
"{",
"<mask>",
"{",
"case",
"input",
"==",
"nil",
":",
"return",
"// Spouts may have nil input",
"\n",
"case",
"input",
".",
"Cross",
"!=",
"nil",
":",
"fo... |
20,490 | all-20491 | [
"getMostRecentCommit",
"gets",
"the",
"hash",
"of",
"the",
"most",
"recent",
"commit",
"to",
"the",
"repository",
".",
"Useful",
"for",
"checking",
"if",
"changes",
"occur",
"."
] | [
"func",
"(",
"r",
"*",
"Repo",
")",
"mostRecentCommit",
"(",
")",
"(",
"string",
",",
"error",
")",
"{",
"<mask>",
":=",
"gitBinary",
"+",
"` --no-pager log -n 1 --pretty=format:\"%H\"`",
"\n",
"c",
",",
"args",
",",
"err",
":=",
"caddy",
".",
"SplitCommandA... |
20,491 | all-20492 | [
"removeClosedConn",
"removes",
"a",
"connection",
"if",
"it",
"s",
"closed",
".",
"Until",
"a",
"connection",
"is",
"fully",
"closed",
"the",
"channel",
"must",
"keep",
"track",
"of",
"it",
"."
] | [
"func",
"(",
"ch",
"*",
"Channel",
")",
"removeClosedConn",
"(",
"c",
"*",
"<mask>",
")",
"{",
"if",
"c",
".",
"readState",
"(",
")",
"!=",
"connectionClosed",
"{",
"return",
"\n",
"}",
"\n\n",
"ch",
".",
"mutable",
".",
"Lock",
"(",
")",
"\n",
"de... |
20,492 | all-20493 | [
"SetPageSet",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_print_settings_set_page_set",
"()",
"."
] | [
"func",
"(",
"ps",
"*",
"PrintSettings",
")",
"SetPageSet",
"(",
"pageSet",
"PageSet",
")",
"{",
"C",
".",
"gtk_print_settings_set_page_set",
"(",
"<mask>",
".",
"native",
"(",
")",
",",
"C",
".",
"GtkPageSet",
"(",
"pageSet",
")",
")",
"\n",
"}"
] |
20,493 | all-20494 | [
"Close",
"implements",
"y",
".",
"Interface",
"."
] | [
"func",
"(",
"s",
"*",
"ConcatIterator",
")",
"Close",
"(",
")",
"error",
"{",
"for",
"_",
",",
"<mask>",
":=",
"range",
"s",
".",
"iters",
"{",
"if",
"err",
":=",
"it",
".",
"Close",
"(",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"errors",
... |
20,494 | all-20495 | [
"UpdateSettings",
"updates",
"settings",
"."
] | [
"func",
"(",
"h",
"*",
"Handler",
")",
"UpdateSettings",
"(",
"tkn",
"string",
",",
"items",
"map",
"[",
"string",
"]",
"string",
")",
"error",
"{",
"logger",
":=",
"h",
".",
"logger",
".",
"Add",
"(",
"\"",
"\"",
",",
"\"",
"\"",
")",
"\n\n",
"i... |
20,495 | all-20496 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"SetPausedParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation2",
"(",
"&",
"r... |
20,496 | all-20497 | [
"SetOutputBin",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_print_settings_set_output_bin",
"()",
"."
] | [
"func",
"(",
"ps",
"*",
"PrintSettings",
")",
"SetOutputBin",
"(",
"bin",
"string",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"bin",
")",
"\n",
"defer",
"C",
".",
"<mask>",
"(",
"unsafe",
".",
"Pointer",
"(",
"cstr",
")",
")",
"\n",
"C",
... |
20,497 | all-20498 | [
"AddHandler",
"adds",
"a",
"new",
"error",
"handler",
"with",
"a",
"code",
"to",
"the",
"registry",
".",
"It",
"there",
"already",
"is",
"an",
"error",
"or",
"handler",
"with",
"the",
"same",
"code",
"ErrErrorAlreadyRegistered",
"will",
"be",
"returned",
"."... | [
"func",
"(",
"r",
"*",
"MapErrorRegistry",
")",
"AddHandler",
"(",
"code",
"int",
",",
"handler",
"func",
"(",
"body",
"[",
"]",
"byte",
")",
"error",
")",
"error",
"{",
"if",
"_",
",",
"<mask>",
":=",
"r",
".",
"errors",
"[",
"code",
"]",
";",
"... |
20,498 | all-20499 | [
"/",
"*",
"BooleanFromSection",
"looks",
"for",
"the",
"specified",
"key",
"and",
"returns",
"it",
"as",
"a",
"boolean",
".",
"If",
"not",
"found",
"the",
"default",
"value",
"def",
"is",
"returned",
"."
] | [
"func",
"(",
"config",
"*",
"Config",
")",
"BooleanFromSection",
"(",
"sectionName",
"string",
",",
"key",
"string",
",",
"def",
"bool",
")",
"bool",
"{",
"section",
":=",
"config",
".",
"sectionForName",
"(",
"sectionName",
")",
"\n\n",
"if",
"section",
"... |
20,499 | all-20500 | [
"SetAssetFS",
"set",
"asset",
"fs",
"for",
"render"
] | [
"func",
"(",
"<mask>",
"*",
"Render",
")",
"SetAssetFS",
"(",
"assetFS",
"assetfs",
".",
"Interface",
")",
"{",
"for",
"_",
",",
"viewPath",
":=",
"range",
"render",
".",
"ViewPaths",
"{",
"assetFS",
".",
"RegisterPath",
"(",
"viewPath",
")",
"\n",
"}",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.