id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
800 | all-801 | [
"SwarmPeers",
"gets",
"all",
"the",
"swarm",
"peers"
] | [
"func",
"(",
"s",
"*",
"Shell",
")",
"SwarmPeers",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"*",
"SwarmConnInfos",
",",
"error",
")",
"{",
"v",
":=",
"&",
"SwarmConnInfos",
"{",
"}",
"\n",
"err",
":=",
"s",
".",
"<mask>",
"(",
"\"",
"\"",
... |
801 | all-802 | [
"Setter",
"allows",
"the",
"user",
"to",
"set",
"the",
"method",
"by",
"which",
"a",
"nonce",
"is",
"stored",
"in",
"the",
"outgoing",
"response",
"."
] | [
"func",
"Setter",
"(",
"s",
"NonceSetter",
")",
"Option",
"{",
"return",
"Option",
"{",
"func",
"(",
"o",
"*",
"<mask>",
")",
"{",
"o",
".",
"setter",
"=",
"s",
"\n",
"}",
"}",
"\n",
"}"
] |
802 | all-803 | [
"MatchFields",
"succeeds",
"if",
"each",
"element",
"of",
"a",
"struct",
"matches",
"the",
"field",
"matcher",
"associated",
"with",
"it",
".",
"It",
"can",
"ignore",
"extra",
"fields",
"and",
"/",
"or",
"missing",
"fields",
".",
"actual",
":",
"=",
"struc... | [
"func",
"MatchFields",
"(",
"options",
"Options",
",",
"fields",
"Fields",
")",
"types",
".",
"GomegaMatcher",
"{",
"return",
"&",
"FieldsMatcher",
"{",
"Fields",
":",
"fields",
",",
"IgnoreExtras",
":",
"<mask>",
"&",
"IgnoreExtras",
"!=",
"0",
",",
"Ignore... |
803 | all-804 | [
"Copy",
"a",
"container",
"on",
"a",
"storage",
"pool",
"that",
"does",
"use",
"a",
"thinpool",
"."
] | [
"func",
"(",
"s",
"*",
"storageLvm",
")",
"copyContainerThinpool",
"(",
"target",
"container",
",",
"source",
"container",
",",
"readonly",
"bool",
")",
"error",
"{",
"err",
":=",
"s",
".",
"createSnapshotContainer",
"(",
"target",
",",
"source",
",",
"reado... |
804 | all-805 | [
"SetImage",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_button_set_image",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Button",
")",
"SetImage",
"(",
"image",
"IWidget",
")",
"{",
"C",
".",
"gtk_button_set_image",
"(",
"v",
".",
"native",
"(",
")",
",",
"<mask>",
".",
"toWidget",
"(",
")",
")",
"\n",
"}"
] |
805 | all-806 | [
"GlobLiteralPrefix",
"returns",
"the",
"prefix",
"before",
"the",
"first",
"glob",
"character"
] | [
"func",
"GlobLiteralPrefix",
"(",
"pattern",
"string",
")",
"string",
"{",
"pattern",
"=",
"clean",
"(",
"pattern",
")",
"\n",
"idx",
":=",
"globRegex",
".",
"FindStringIndex",
"(",
"pattern",
")",
"\n",
"if",
"idx",
"==",
"nil",
"{",
"return",
"pattern",
... |
806 | all-807 | [
"Enables",
"cross",
"-",
"site",
"script",
"calls",
"."
] | [
"func",
"SetCORS",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"o",
"*",
"regexp",
".",
"Regexp",
",",
"r",
"*",
"http",
".",
"Request",
")",
"{",
"origin",
":=",
"r",
".",
"Header",
".",
"Get",
"(",
"\"",
"\"",
")",
"\n",
"if",
"origin",
"==",... |
807 | all-808 | [
"/",
"*",
"Excluding",
"a",
"recipient",
"on",
"a",
"trigger",
"to",
"multiple",
"channels",
"."
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"TriggerMultiExclusive",
"(",
"channels",
"[",
"]",
"string",
",",
"eventName",
"string",
",",
"data",
"interface",
"{",
"}",
",",
"socketID",
"string",
")",
"(",
"*",
"BufferedEvents",
",",
"error",
")",
"{",
"retur... |
808 | all-809 | [
"GenerateCredentialsEndpointRelativeURI",
"generates",
"the",
"relative",
"URI",
"for",
"the",
"credentials",
"endpoint",
"for",
"a",
"given",
"task",
"id",
"."
] | [
"func",
"(",
"roleCredentials",
"*",
"IAMRoleCredentials",
")",
"GenerateCredentialsEndpointRelativeURI",
"(",
")",
"string",
"{",
"<mask>",
"fmt",
".",
"Sprintf",
"(",
"credentialsEndpointRelativeURIFormat",
",",
"CredentialsPath",
",",
"roleCredentials",
".",
"Credentia... |
809 | all-810 | [
"GitHubClientWithLogFields",
"returns",
"a",
"GitHub",
"client",
"with",
"extra",
"logging",
"fields"
] | [
"func",
"(",
"o",
"*",
"GitHubOptions",
")",
"GitHubClientWithLogFields",
"(",
"secretAgent",
"*",
"secret",
".",
"Agent",
",",
"dryRun",
"bool",
",",
"fields",
"logrus",
".",
"Fields",
")",
"(",
"client",
"*",
"github",
".",
"Client",
",",
"err",
"error",... |
810 | all-811 | [
"UnmarshalText",
"hydrates",
"this",
"instance",
"from",
"text"
] | [
"func",
"(",
"u",
"*",
"CreditCard",
")",
"UnmarshalText",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"// validation is performed later on",
"*",
"u",
"=",
"CreditCard",
"(",
"string",
"(",
"data",
")",
")",
"\n",
"return",
"nil",
"\n",
"}"
] |
811 | all-812 | [
"processSources",
"pulls",
"from",
"input",
"channels",
"and",
"processes",
"them",
"into",
"the",
"output",
"channel",
"until",
"there",
"is",
"no",
"more",
"work"
] | [
"func",
"(",
"w",
"*",
"workManager",
")",
"processSources",
"(",
")",
"{",
"var",
"(",
"ok",
"bool",
"\n",
"path",
"string",
"\n",
"seq",
"*",
"fileseq",
".",
"FileSequence",
"\n",
")",
"\n\n",
"fileopts",
":=",
"w",
".",
"fileOpts",
"\n\n",
"inDirs",... |
812 | all-813 | [
"coalesceAdjacentEdits",
"coalesces",
"the",
"list",
"of",
"edits",
"into",
"groups",
"of",
"adjacent",
"equal",
"or",
"unequal",
"counts",
"."
] | [
"func",
"coalesceAdjacentEdits",
"(",
"name",
"string",
",",
"es",
"diff",
".",
"EditScript",
")",
"(",
"groups",
"[",
"]",
"diffStats",
")",
"{",
"var",
"prevCase",
"int",
"// Arbitrary index into which case last occurred",
"\n",
"lastStats",
":=",
"func",
"(",
... |
813 | all-814 | [
"UnmarshalBinary",
"implements",
"encoding",
".",
"BinaryUnmarshaler",
"."
] | [
"func",
"(",
"uuid",
"*",
"UUID",
")",
"UnmarshalBinary",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"if",
"len",
"(",
"data",
")",
"!=",
"16",
"{",
"return",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"len",
"(",
"data",
")",
")",
"\n"... |
814 | all-815 | [
"TemplateConfigFor",
"returns",
"the",
"TemplateConfig",
"for",
"the",
"given",
"Template"
] | [
"func",
"(",
"r",
"*",
"<mask>",
")",
"templateConfigsFor",
"(",
"tmpl",
"*",
"template",
".",
"Template",
")",
"[",
"]",
"*",
"config",
".",
"TemplateConfig",
"{",
"return",
"r",
".",
"ctemplatesMap",
"[",
"tmpl",
".",
"ID",
"(",
")",
"]",
"\n",
"}"... |
815 | all-816 | [
"Pin",
"the",
"given",
"path"
] | [
"func",
"(",
"s",
"*",
"Shell",
")",
"Pin",
"(",
"path",
"string",
")",
"error",
"{",
"return",
"s",
".",
"Request",
"(",
"\"",
"\"",
",",
"<mask>",
")",
".",
"Option",
"(",
"\"",
"\"",
",",
"true",
")",
".",
"Exec",
"(",
"context",
".",
"Backg... |
816 | all-817 | [
"Helpers"
] | [
"func",
"(",
"conn",
"*",
"LocalConnection",
")",
"sendSimpleProtocolMsg",
"(",
"tag",
"protocolTag",
")",
"error",
"{",
"return",
"conn",
".",
"sendProtocolMsg",
"(",
"protocolMsg",
"{",
"tag",
":",
"<mask>",
"}",
")",
"\n",
"}"
] |
817 | all-818 | [
"Delete",
"removes",
"the",
"entry",
"associated",
"with",
"the",
"key",
"from",
"cache"
] | [
"func",
"(",
"lru",
"*",
"lruCache",
")",
"Delete",
"(",
"key",
"string",
")",
"{",
"lru",
".",
"Lock",
"(",
")",
"\n",
"defer",
"lru",
".",
"Unlock",
"(",
")",
"\n\n",
"lru",
".",
"removeFromEvictList",
"(",
"key",
")",
"\n",
"<mask>",
"(",
"lru",... |
818 | all-819 | [
"SetMarkup",
"is",
"a",
"wrapper",
"around",
"gtk_label_set_markup",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Label",
")",
"SetMarkup",
"(",
"str",
"string",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"str",
")",
"\n",
"defer",
"C",
".",
"<mask>",
"(",
"unsafe",
".",
"Pointer",
"(",
"cstr",
")",
")",
"\n",
"C",
".",
"gtk_... |
819 | all-820 | [
"SelectMany",
"allows",
"for",
"unfolding",
"of",
"values",
"."
] | [
"func",
"SelectMany",
"(",
"<mask>",
"Enumerable",
",",
"toMany",
"Unfolder",
")",
"Enumerable",
"{",
"return",
"selectManyer",
"{",
"original",
":",
"subject",
",",
"toMany",
":",
"toMany",
",",
"}",
"\n",
"}"
] |
820 | all-821 | [
"Do",
"executes",
"Security",
".",
"setIgnoreCertificateErrors",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"SetIgnoreCertificateErrorsParams",
")",
"Do",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandSetIgnoreCertificateErrors",
",",
"p",
",",
"nil",
")"... |
821 | all-822 | [
"GetClient",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockFactory",
")",
"GetClient",
"(",
"arg0",
"dockerclient",
".",
"DockerVersion",
")",
"(",
"sdkclient",
".",
"Client",
",",
"error",
")",
"{",
"ret",
":=",
"m",
".",
"ctrl",
".",
"Call",
"(",
"m",
",",
"\"",
"\"",
",",
"ar... |
822 | all-823 | [
"ParseExec",
"parses",
"the",
"XPath",
"string",
"xpstr",
"and",
"runs",
"Exec",
"."
] | [
"func",
"ParseExec",
"(",
"xpstr",
"string",
",",
"t",
"tree",
".",
"Node",
",",
"opts",
"...",
"FuncOpts",
")",
"(",
"<mask>",
".",
"Result",
",",
"error",
")",
"{",
"xp",
",",
"err",
":=",
"Parse",
"(",
"xpstr",
")",
"\n",
"if",
"err",
"!=",
"n... |
823 | all-824 | [
"CreateProduct",
"creates",
"new",
"product",
"."
] | [
"func",
"(",
"h",
"*",
"<mask>",
")",
"CreateProduct",
"(",
"tkn",
"string",
",",
"product",
"data",
".",
"Product",
")",
"(",
"*",
"string",
",",
"error",
")",
"{",
"logger",
":=",
"h",
".",
"logger",
".",
"Add",
"(",
"\"",
"\"",
",",
"\"",
"\""... |
824 | all-825 | [
"GetState",
"retrieves",
"the",
"State",
"value",
"from",
"the",
"union",
"returning",
"ok",
"if",
"the",
"union",
"s",
"switch",
"indicated",
"the",
"value",
"is",
"valid",
"."
] | [
"func",
"(",
"u",
"LedgerEntryChange",
")",
"GetState",
"(",
")",
"(",
"result",
"LedgerEntry",
",",
"ok",
"bool",
")",
"{",
"armName",
",",
"_",
":=",
"u",
".",
"ArmForSwitch",
"(",
"int32",
"(",
"u",
".",
"Type",
")",
")",
"\n\n",
"if",
"armName",
... |
825 | all-826 | [
"SendSystemError",
"returns",
"a",
"system",
"error",
"response",
"to",
"the",
"peer",
".",
"The",
"call",
"is",
"considered",
"complete",
"after",
"this",
"method",
"is",
"called",
"and",
"no",
"further",
"data",
"can",
"be",
"written",
"."
] | [
"func",
"(",
"response",
"*",
"InboundCallResponse",
")",
"SendSystemError",
"(",
"err",
"error",
")",
"error",
"{",
"if",
"response",
".",
"err",
"!=",
"nil",
"{",
"return",
"response",
".",
"err",
"\n",
"}",
"\n",
"// Fail all future attempts to read fragments... |
826 | all-827 | [
"newRaftNode",
"initiates",
"a",
"raft",
"instance",
"and",
"returns",
"a",
"committed",
"log",
"entry",
"channel",
"and",
"error",
"channel",
".",
"Proposals",
"for",
"log",
"updates",
"are",
"sent",
"over",
"the",
"provided",
"the",
"proposal",
"channel",
".... | [
"func",
"newRaftNode",
"(",
"id",
"int",
",",
"peers",
"[",
"]",
"string",
",",
"join",
"bool",
",",
"getSnapshot",
"func",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
",",
"proposeC",
"<-",
"chan",
"string",
",",
"confChangeC",
"<-",
"chan",... |
827 | all-828 | [
"PopupAtPointer",
"()",
"is",
"a",
"wrapper",
"for",
"gtk_menu_popup_at_pointer",
"()",
"on",
"older",
"versions",
"it",
"uses",
"PopupAtMouseCursor"
] | [
"func",
"(",
"v",
"*",
"Menu",
")",
"PopupAtPointer",
"(",
"triggerEvent",
"*",
"gdk",
".",
"<mask>",
")",
"{",
"e",
":=",
"(",
"*",
"C",
".",
"GdkEvent",
")",
"(",
"unsafe",
".",
"Pointer",
"(",
"triggerEvent",
".",
"Native",
"(",
")",
")",
")",
... |
828 | all-829 | [
"ArmForSwitch",
"returns",
"which",
"field",
"name",
"should",
"be",
"used",
"for",
"storing",
"the",
"value",
"for",
"an",
"instance",
"of",
"OperationResultTr"
] | [
"func",
"(",
"u",
"OperationResultTr",
")",
"ArmForSwitch",
"(",
"sw",
"int32",
")",
"(",
"string",
",",
"bool",
")",
"{",
"switch",
"OperationType",
"(",
"sw",
")",
"{",
"case",
"OperationTypeCreateAccount",
":",
"return",
"\"",
"\"",
",",
"true",
"\n",
... |
829 | all-830 | [
"CalcBruteForceCardinality",
"calculates",
"the",
"brute",
"force",
"cardinality",
"TODO",
":",
"Validate",
"against",
"python"
] | [
"func",
"CalcBruteForceCardinality",
"(",
"password",
"string",
")",
"float64",
"{",
"lower",
",",
"upper",
",",
"digits",
",",
"symbols",
":=",
"float64",
"(",
"0",
")",
",",
"float64",
"(",
"0",
")",
",",
"float64",
"(",
"0",
")",
",",
"float64",
"("... |
830 | all-831 | [
"Grow",
"automatically",
"grows",
"the",
"underlying",
"buffer",
"so",
"that",
"it",
"can",
"hold",
"at",
"least",
"min",
"elements"
] | [
"func",
"(",
"s",
"*",
"Stack",
")",
"Grow",
"(",
"<mask>",
"int",
")",
"{",
"// Automatically grow the stack to some long-enough length",
"if",
"min",
"<=",
"s",
".",
"BufferSize",
"(",
")",
"{",
"// we have enough",
"return",
"\n",
"}",
"\n\n",
"s",
".",
"... |
831 | all-832 | [
"SetCreateFolders",
"is",
"a",
"wrapper",
"around",
"gtk_file_chooser_set_create_folders",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"FileChooser",
")",
"SetCreateFolders",
"(",
"<mask>",
"bool",
")",
"{",
"C",
".",
"gtk_file_chooser_set_create_folders",
"(",
"v",
".",
"native",
"(",
")",
",",
"gbool",
"(",
"value",
")",
")",
"\n",
"}"
] |
832 | all-833 | [
"ReadUvarint",
"reads",
"an",
"unsigned",
"varint",
"from",
"the",
"buffer",
"."
] | [
"func",
"(",
"r",
"*",
"ReadBuffer",
")",
"ReadUvarint",
"(",
")",
"uint64",
"{",
"v",
",",
"_",
":=",
"<mask>",
".",
"ReadUvarint",
"(",
"r",
")",
"\n",
"return",
"v",
"\n",
"}"
] |
833 | all-834 | [
"Stop",
"all",
"socket",
"listeners"
] | [
"func",
"(",
"app",
"*",
"App",
")",
"stopListeners",
"(",
")",
"{",
"logger",
":=",
"zapwriter",
".",
"Logger",
"(",
"\"",
"\"",
")",
"\n\n",
"if",
"app",
".",
"Api",
"!=",
"nil",
"{",
"app",
".",
"Api",
".",
"Stop",
"(",
")",
"\n",
"app",
"."... |
834 | all-835 | [
"Configure",
"is",
"a",
"wrapper",
"around",
"gtk_adjustment_configure",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Adjustment",
")",
"Configure",
"(",
"value",
",",
"lower",
",",
"upper",
",",
"stepIncrement",
",",
"pageIncrement",
",",
"pageSize",
"float64",
")",
"{",
"C",
".",
"gtk_adjustment_configure",
"(",
"v",
".",
"native",
"(",
")",
",... |
835 | all-836 | [
"NewFile",
"creates",
"and",
"returns",
"a",
"file",
"."
] | [
"func",
"NewFile",
"(",
"path",
"string",
",",
"data",
"[",
"]",
"byte",
")",
"*",
"<mask>",
"{",
"return",
"&",
"File",
"{",
"path",
":",
"path",
",",
"data",
":",
"data",
",",
"}",
"\n",
"}"
] |
836 | all-837 | [
"SetSentStatus",
"marks",
"the",
"eni",
"attached",
"status",
"has",
"been",
"sent"
] | [
"func",
"(",
"eni",
"*",
"ENIAttachment",
")",
"SetSentStatus",
"(",
")",
"{",
"eni",
".",
"guard",
".",
"Lock",
"(",
")",
"\n",
"defer",
"eni",
".",
"guard",
".",
"Unlock",
"(",
")",
"\n\n",
"eni",
".",
"AttachStatusSent",
"=",
"<mask>",
"\n",
"}"
] |
837 | all-838 | [
"Remove",
"removes",
"value",
"from",
"the",
"set",
"if",
"it",
"exists",
"in",
"the",
"set",
"."
] | [
"func",
"(",
"s",
"*",
"Set",
")",
"Remove",
"(",
"value",
"interface",
"{",
"}",
")",
"{",
"s",
".",
"Lock",
"(",
")",
"\n",
"defer",
"s",
".",
"Unlock",
"(",
")",
"\n",
"<mask>",
"(",
"s",
".",
"m",
",",
"value",
")",
"\n",
"}"
] |
838 | all-839 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"EventInspectModeCanceled",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay20",
"(",
"... |
839 | all-840 | [
"anyKey",
"reads",
"the",
"key",
"from",
"file",
"or",
"generates",
"a",
"new",
"one",
"if",
"gen",
"==",
"true",
".",
"It",
"returns",
"an",
"error",
"if",
"filename",
"exists",
"but",
"cannot",
"be",
"read",
".",
"A",
"newly",
"generated",
"key",
"is... | [
"func",
"anyKey",
"(",
"filename",
"string",
",",
"gen",
"bool",
")",
"(",
"crypto",
".",
"Signer",
",",
"error",
")",
"{",
"k",
",",
"err",
":=",
"readKey",
"(",
"filename",
")",
"\n",
"if",
"err",
"==",
"nil",
"{",
"return",
"k",
",",
"nil",
"\... |
840 | all-841 | [
"WarnFunc",
"outputs",
"Warn",
"level",
"log",
"returned",
"from",
"the",
"function"
] | [
"func",
"(",
"g",
"*",
"Glg",
")",
"WarnFunc",
"(",
"f",
"func",
"(",
")",
"string",
")",
"error",
"{",
"if",
"g",
".",
"isModeEnable",
"(",
"WARN",
")",
"{",
"return",
"g",
".",
"out",
"(",
"<mask>",
",",
"\"",
"\"",
",",
"f",
"(",
")",
")",... |
841 | all-842 | [
"NewBlockAPIServer",
"creates",
"a",
"BlockAPIServer",
"using",
"the",
"credentials",
"it",
"finds",
"in",
"the",
"environment"
] | [
"func",
"NewBlockAPIServer",
"(",
"dir",
"string",
",",
"cacheBytes",
"int64",
",",
"backend",
"string",
",",
"etcdAddress",
"string",
")",
"(",
"BlockAPIServer",
",",
"error",
")",
"{",
"switch",
"backend",
"{",
"case",
"MinioBackendEnvVar",
":",
"// S3 compati... |
842 | all-843 | [
"String",
"returns",
"a",
"string",
"represenation",
"of",
"p"
] | [
"func",
"(",
"p",
"*",
"Price",
")",
"<mask>",
"(",
")",
"string",
"{",
"return",
"big",
".",
"NewRat",
"(",
"int64",
"(",
"p",
".",
"N",
")",
",",
"int64",
"(",
"p",
".",
"D",
")",
")",
".",
"FloatString",
"(",
"7",
")",
"\n",
"}"
] |
843 | all-844 | [
"/",
"*",
"yopla",
":",
"1"
] | [
"func",
"(",
"n",
"ACFullname",
")",
"TinyNameId",
"(",
")",
"string",
"{",
"split",
":=",
"strings",
".",
"Split",
"(",
"string",
"(",
"n",
")",
",",
"\"",
"\"",
")",
"\n",
"return",
"split",
"[",
"len",
"(",
"<mask>",
")",
"-",
"1",
"]",
"\n",
... |
844 | all-845 | [
"SetKeys",
"changes",
"the",
"value",
"of",
"apiKey",
"and",
"appKey",
"."
] | [
"func",
"(",
"c",
"*",
"<mask>",
")",
"SetKeys",
"(",
"apiKey",
",",
"appKey",
"string",
")",
"{",
"c",
".",
"apiKey",
"=",
"apiKey",
"\n",
"c",
".",
"appKey",
"=",
"appKey",
"\n",
"}"
] |
845 | all-846 | [
"WithHTTPClient",
"adds",
"the",
"HTTPClient",
"to",
"the",
"patch",
"apps",
"app",
"params"
] | [
"func",
"(",
"o",
"*",
"PatchAppsAppParams",
")",
"WithHTTPClient",
"(",
"client",
"*",
"http",
".",
"<mask>",
")",
"*",
"PatchAppsAppParams",
"{",
"o",
".",
"SetHTTPClient",
"(",
"client",
")",
"\n",
"return",
"o",
"\n",
"}"
] |
846 | all-847 | [
"NewSized",
"initializes",
"a",
"new",
"Map",
"with",
"the",
"given",
"size",
"."
] | [
"func",
"NewSized",
"(",
"width",
",",
"height",
"int",
")",
"*",
"Map",
"{",
"return",
"&",
"Map",
"{",
"m",
":",
"C",
".",
"mapnik_map",
"(",
"C",
".",
"uint",
"(",
"width",
")",
",",
"C",
".",
"uint",
"(",
"height",
")",
")",
",",
"width",
... |
847 | all-848 | [
"NewCreateAccountResult",
"creates",
"a",
"new",
"CreateAccountResult",
"."
] | [
"func",
"NewCreateAccountResult",
"(",
"code",
"CreateAccountResultCode",
",",
"value",
"interface",
"{",
"}",
")",
"(",
"result",
"CreateAccountResult",
",",
"err",
"error",
")",
"{",
"result",
".",
"Code",
"=",
"<mask>",
"\n",
"switch",
"CreateAccountResultCode"... |
848 | all-849 | [
"Delete",
"deletes",
"a",
"hashtree",
"from",
"the",
"cache",
"."
] | [
"func",
"(",
"c",
"*",
"MergeCache",
")",
"Delete",
"(",
"<mask>",
"int64",
")",
"error",
"{",
"return",
"c",
".",
"Cache",
".",
"Delete",
"(",
"fmt",
".",
"Sprint",
"(",
"id",
")",
")",
"\n",
"}"
] |
849 | all-850 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"SetFocusEmulationEnabledParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation8",
"(",
"&",
"w",
","... |
850 | all-851 | [
"Vec3Sub",
"performs",
"a",
"vector",
"subtraction",
".",
"dest",
"=",
"v1",
"-",
"v2",
".",
"dest",
"[",
"out",
"]",
"The",
"result",
"vector",
".",
"v1",
"[",
"in",
"]",
"The",
"base",
"vector",
".",
"v2",
"[",
"in",
"]",
"The",
"vector",
"to",
... | [
"func",
"Vec3Sub",
"(",
"<mask>",
",",
"v1",
",",
"v2",
"Vec3",
")",
"{",
"dest",
"[",
"0",
"]",
"=",
"v1",
"[",
"0",
"]",
"-",
"v2",
"[",
"0",
"]",
"\n",
"dest",
"[",
"1",
"]",
"=",
"v1",
"[",
"1",
"]",
"-",
"v2",
"[",
"1",
"]",
"\n",
... |
851 | all-852 | [
"Proto",
"finds",
"the",
"specified",
"protocol",
"for",
"a",
"service",
"based",
"off",
"of",
"the",
"service",
"s",
"name",
"and",
"which",
"interface",
"you",
"are",
"accessing",
".",
"Values",
"are",
"found",
"in",
"environment",
"variables",
"fitting",
... | [
"func",
"Proto",
"(",
"service",
",",
"name",
"string",
")",
"(",
"string",
",",
"error",
")",
"{",
"template",
":=",
"fmt",
".",
"Sprintf",
"(",
"templateVar",
",",
"service",
",",
"<mask>",
")",
"\n",
"return",
"getVar",
"(",
"fmt",
".",
"Sprintf",
... |
852 | all-853 | [
"Update",
"the",
"key",
"with",
"the",
"given",
"data",
".",
"Valid",
"parameters",
"may",
"be",
"found",
"here",
":",
"https",
":",
"//",
"www",
".",
"twilio",
".",
"com",
"/",
"docs",
"/",
"api",
"/",
"rest",
"/",
"keys#instance",
"-",
"post"
] | [
"func",
"(",
"a",
"*",
"AccountService",
")",
"Update",
"(",
"ctx",
"context",
".",
"Context",
",",
"sid",
"string",
",",
"data",
"url",
".",
"Values",
")",
"(",
"*",
"Account",
",",
"error",
")",
"{",
"acct",
":=",
"<mask>",
"(",
"Account",
")",
"... |
853 | all-854 | [
"/",
"*",
"String",
"looks",
"for",
"the",
"specified",
"key",
"and",
"returns",
"it",
"as",
"a",
"string",
".",
"If",
"not",
"found",
"the",
"default",
"value",
"def",
"is",
"returned",
"."
] | [
"func",
"(",
"config",
"*",
"Config",
")",
"String",
"(",
"<mask>",
"string",
",",
"def",
"string",
")",
"string",
"{",
"return",
"getString",
"(",
"config",
".",
"values",
",",
"key",
",",
"def",
")",
"\n",
"}"
] |
854 | all-855 | [
"zfs",
"is",
"a",
"helper",
"function",
"to",
"wrap",
"typical",
"calls",
"to",
"zfs",
"."
] | [
"func",
"zfs",
"(",
"arg",
"...",
"string",
")",
"(",
"[",
"]",
"[",
"]",
"string",
",",
"error",
")",
"{",
"c",
":=",
"<mask>",
"{",
"Command",
":",
"\"",
"\"",
"}",
"\n",
"return",
"c",
".",
"Run",
"(",
"arg",
"...",
")",
"\n",
"}"
] |
855 | all-856 | [
"removeStr",
"removes",
"s",
"from",
"ss",
"preserving",
"the",
"sorted",
"order",
"of",
"ss",
"(",
"for",
"removing",
"child",
"strings",
"from",
"DirectoryNodes",
"."
] | [
"func",
"removeStr",
"(",
"ss",
"*",
"[",
"]",
"string",
",",
"s",
"string",
")",
"bool",
"{",
"idx",
":=",
"sort",
".",
"SearchStrings",
"(",
"*",
"ss",
",",
"s",
")",
"\n",
"if",
"idx",
"==",
"len",
"(",
"*",
"<mask>",
")",
"{",
"return",
"fa... |
856 | all-857 | [
"Stability",
":",
"***",
"EXPERIMENTAL",
"***",
"This",
"endpoint",
"finalises",
"an",
"upload",
"done",
"through",
"the",
"blob",
"storageType",
".",
"The",
"queue",
"will",
"ensure",
"that",
"the",
"task",
"/",
"run",
"is",
"still",
"allowing",
"artifacts",
... | [
"func",
"(",
"queue",
"*",
"Queue",
")",
"CompleteArtifact",
"(",
"taskId",
",",
"runId",
",",
"name",
"string",
",",
"payload",
"*",
"CompleteArtifactRequest",
")",
"error",
"{",
"cd",
":=",
"tcclient",
".",
"Client",
"(",
"*",
"queue",
")",
"\n",
"_",
... |
857 | all-858 | [
"dockerCertDir",
"returns",
"a",
"path",
"to",
"a",
"directory",
"to",
"be",
"consumed",
"by",
"tlsclientconfig",
".",
"SetupCertificates",
"()",
"depending",
"on",
"ctx",
"and",
"hostPort",
"."
] | [
"func",
"dockerCertDir",
"(",
"sys",
"*",
"types",
".",
"SystemContext",
",",
"hostPort",
"string",
")",
"(",
"string",
",",
"error",
")",
"{",
"if",
"sys",
"!=",
"nil",
"&&",
"sys",
".",
"DockerCertPath",
"!=",
"\"",
"\"",
"{",
"return",
"sys",
".",
... |
858 | all-859 | [
"native",
"returns",
"a",
"pointer",
"to",
"the",
"underlying",
"GObject",
"as",
"a",
"GtkOrientable",
"."
] | [
"func",
"(",
"v",
"*",
"Orientable",
")",
"native",
"(",
")",
"*",
"C",
".",
"GtkOrientable",
"{",
"if",
"v",
"==",
"nil",
"||",
"v",
".",
"GObject",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"p",
":=",
"unsafe",
".",
"Pointer",
"(",
... |
859 | all-860 | [
"WithDuration",
"duration",
"between",
"touchdown",
"and",
"touchup",
"events",
"in",
"ms",
"(",
"default",
":",
"50",
")",
"."
] | [
"func",
"(",
"p",
"SynthesizeTapGestureParams",
")",
"WithDuration",
"(",
"duration",
"int64",
")",
"*",
"SynthesizeTapGestureParams",
"{",
"p",
".",
"Duration",
"=",
"<mask>",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
860 | all-861 | [
"addENIAttachmentToState",
"adds",
"the",
"eni",
"info",
"to",
"the",
"state"
] | [
"func",
"(",
"handler",
"*",
"attachENIHandler",
")",
"addENIAttachmentToState",
"(",
"message",
"*",
"ecsacs",
".",
"AttachTaskNetworkInterfacesMessage",
",",
"receivedAt",
"time",
".",
"Time",
")",
"error",
"{",
"attachmentARN",
":=",
"aws",
".",
"StringValue",
... |
861 | all-862 | [
"DeleteRuleSetByCID",
"deletes",
"rule",
"set",
"with",
"passed",
"cid",
"."
] | [
"func",
"(",
"a",
"*",
"API",
")",
"DeleteRuleSetByCID",
"(",
"cid",
"CIDType",
")",
"(",
"bool",
",",
"error",
")",
"{",
"if",
"cid",
"==",
"nil",
"||",
"*",
"cid",
"==",
"\"",
"\"",
"{",
"return",
"false",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
... |
862 | all-863 | [
"GetAPITokenOk",
"returns",
"a",
"tuple",
"with",
"the",
"APIToken",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"i",
"*",
"integrationPD",
")",
"GetAPITokenOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"i",
"==",
"nil",
"||",
"i",
".",
"APIToken",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"<mask>",
"\n",
"}",
"\n",
"return",
"*... |
863 | all-864 | [
"HasSubdomain",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"i",
"*",
"integrationPD",
")",
"HasSubdomain",
"(",
")",
"bool",
"{",
"if",
"i",
"!=",
"nil",
"&&",
"i",
".",
"Subdomain",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
864 | all-865 | [
"expandStorageDrsSpaceLoadBalanceConfig",
"reads",
"certain",
"ResourceData",
"keys",
"and",
"returns",
"a",
"StorageDrsSpaceLoadBalanceConfig",
"."
] | [
"func",
"expandStorageDrsSpaceLoadBalanceConfig",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"version",
"viapi",
".",
"VSphereVersion",
",",
")",
"*",
"types",
".",
"StorageDrsSpaceLoadBalanceConfig",
"{",
"obj",
":=",
"&",
"types",
".",
"StorageDrsSpaceLoad... |
865 | all-866 | [
"title",
":",
"update",
"user",
"quota",
"path",
":",
"/",
"users",
"/",
"{",
"email",
"}",
"/",
"quota",
"method",
":",
"PUT",
"consume",
":",
"application",
"/",
"x",
"-",
"www",
"-",
"form",
"-",
"urlencoded",
"responses",
":",
"200",
":",
"Quota"... | [
"func",
"changeUserQuota",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"t",
"auth",
".",
"Token",
")",
"(",
"err",
"error",
")",
"{",
"email",
":=",
"r",
".",
"URL",
".",
"Query",
"(",
")",
".",
"Get",
"("... |
866 | all-867 | [
"WriteAmazonAssets",
"writes",
"assets",
"to",
"an",
"amazon",
"backend",
"."
] | [
"func",
"WriteAmazonAssets",
"(",
"encoder",
"Encoder",
",",
"opts",
"*",
"AssetOpts",
",",
"region",
"string",
",",
"bucket",
"string",
",",
"volumeSize",
"int",
",",
"creds",
"*",
"AmazonCreds",
",",
"cloudfrontDistro",
"string",
")",
"error",
"{",
"if",
"... |
867 | all-868 | [
"GetLimit",
"returns",
"the",
"Limit",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"w",
"*",
"WidgetProcessQuery",
")",
"GetLimit",
"(",
")",
"int",
"{",
"if",
"w",
"==",
"nil",
"||",
"w",
".",
"Limit",
"==",
"nil",
"{",
"return",
"0",
"\n",
"}",
"\n",
"<mask>",
"*",
"w",
".",
"Limit",
"\n",
"}"
] |
868 | all-869 | [
"GetCurrentApproversSet",
"returns",
"the",
"set",
"of",
"approvers",
"(",
"login",
"only",
"normalized",
"to",
"lower",
"case",
")"
] | [
"func",
"(",
"ap",
"Approvers",
")",
"GetCurrentApproversSet",
"(",
")",
"sets",
".",
"String",
"{",
"currentApprovers",
":=",
"sets",
".",
"NewString",
"(",
")",
"\n\n",
"for",
"approver",
":=",
"<mask>",
"ap",
".",
"approvers",
"{",
"currentApprovers",
"."... |
869 | all-870 | [
"GetKnownStatus",
"returns",
"the",
"known",
"status",
"of",
"the",
"container"
] | [
"func",
"(",
"c",
"*",
"Container",
")",
"GetKnownStatus",
"(",
")",
"apicontainerstatus",
".",
"ContainerStatus",
"{",
"c",
".",
"<mask>",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n\n",
"return",
"c",
".",
... |
870 | all-871 | [
"expandClusterDrsVMConfigInfo",
"reads",
"certain",
"ResourceData",
"keys",
"and",
"returns",
"a",
"ClusterDpmHostConfigInfo",
"."
] | [
"func",
"expandClusterDpmHostConfigInfo",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"host",
"*",
"object",
".",
"HostSystem",
")",
"(",
"*",
"<mask>",
".",
"ClusterDpmHostConfigInfo",
",",
"error",
")",
"{",
"obj",
":=",
"&",
"types",
".",
"ClusterD... |
871 | all-872 | [
"QueryChildPacking",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_box_query_child_packing",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Box",
")",
"QueryChildPacking",
"(",
"child",
"IWidget",
")",
"(",
"expand",
",",
"fill",
"bool",
",",
"padding",
"uint",
",",
"packType",
"PackType",
")",
"{",
"var",
"cexpand",
",",
"cfill",
"C",
".",
"gboolean",
"\n",
"<mask>... |
872 | all-873 | [
"ListenIP",
"returns",
"the",
"IP",
"to",
"bind",
"to",
"in",
"Listen",
".",
"It",
"tries",
"to",
"find",
"an",
"IP",
"that",
"can",
"be",
"used",
"by",
"other",
"machines",
"to",
"reach",
"this",
"machine",
"."
] | [
"func",
"ListenIP",
"(",
")",
"(",
"<mask>",
".",
"IP",
",",
"error",
")",
"{",
"interfaces",
",",
"err",
":=",
"net",
".",
"Interfaces",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n",
"return",
"list... |
873 | all-874 | [
"SetDesiredStatus",
"safely",
"sets",
"the",
"desired",
"status",
"of",
"the",
"resource"
] | [
"func",
"(",
"vol",
"*",
"VolumeResource",
")",
"SetDesiredStatus",
"(",
"status",
"resourcestatus",
".",
"ResourceStatus",
")",
"{",
"vol",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"vol",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n\n",
"vol",
... |
874 | all-875 | [
"handle",
"reads",
"the",
"request",
"and",
"writes",
"the",
"response"
] | [
"func",
"handle",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"<mask>",
")",
"{",
"req",
",",
"err",
":=",
"readRequest",
"(",
"r",
".",
"Body",
",",
"r",
".",
"Header",
".",
"Get",
"(",
"\"",
"\"",
")",
")",
"\n",
"if"... |
875 | all-876 | [
"Clear",
"empties",
"the",
"set",
"."
] | [
"func",
"(",
"s",
"*",
"<mask>",
")",
"Clear",
"(",
")",
"{",
"s",
".",
"Lock",
"(",
")",
"\n",
"defer",
"s",
".",
"Unlock",
"(",
")",
"\n",
"s",
".",
"m",
"=",
"make",
"(",
"map",
"[",
"interface",
"{",
"}",
"]",
"struct",
"{",
"}",
")",
... |
876 | all-877 | [
"xep",
"-",
"0045",
"7",
".",
"2",
".",
"6"
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"JoinProtectedMUC",
"(",
"jid",
",",
"nick",
"string",
",",
"password",
"string",
",",
"history_type",
",",
"history",
"int",
",",
"history_date",
"*",
"time",
".",
"Time",
")",
"(",
"n",
"int",
",",
"err",
"error"... |
877 | all-878 | [
"BreadthMatchAll",
"performs",
"a",
"breadth",
"first",
"search",
"of",
"the",
"Part",
"tree",
"and",
"returns",
"all",
"parts",
"that",
"cause",
"the",
"given",
"matcher",
"to",
"return",
"true"
] | [
"func",
"(",
"p",
"*",
"Part",
")",
"BreadthMatchAll",
"(",
"matcher",
"PartMatcher",
")",
"[",
"]",
"*",
"Part",
"{",
"q",
":=",
"<mask>",
".",
"New",
"(",
")",
"\n",
"q",
".",
"PushBack",
"(",
"p",
")",
"\n\n",
"matches",
":=",
"make",
"(",
"["... |
878 | all-879 | [
"Also",
"for",
"arrays",
"."
] | [
"func",
"copySliceToTable",
"(",
"L",
"*",
"lua",
".",
"State",
",",
"v",
"reflect",
".",
"Value",
",",
"visited",
"visitor",
")",
"{",
"vp",
":=",
"v",
"\n",
"for",
"v",
".",
"Kind",
"(",
")",
"==",
"reflect",
".",
"Ptr",
"{",
"// For arrays.",
"v... |
879 | all-880 | [
"ValidEnum",
"validates",
"a",
"proposed",
"value",
"for",
"this",
"enum",
".",
"Implements",
"the",
"Enum",
"interface",
"for",
"ManageDataResultCode"
] | [
"func",
"(",
"e",
"ManageDataResultCode",
")",
"ValidEnum",
"(",
"v",
"int32",
")",
"bool",
"{",
"_",
",",
"<mask>",
":=",
"manageDataResultCodeMap",
"[",
"v",
"]",
"\n",
"return",
"ok",
"\n",
"}"
] |
880 | all-881 | [
"NewOutgoingUnbanChatMember",
"creates",
"a",
"request",
"to",
"unban",
"a",
"member",
"of",
"a",
"group",
"chat",
"or",
"channel",
"."
] | [
"func",
"(",
"api",
"*",
"TelegramBotAPI",
")",
"NewOutgoingUnbanChatMember",
"(",
"chat",
"Recipient",
",",
"userID",
"int",
")",
"*",
"OutgoingUnbanChatMember",
"{",
"<mask>",
"&",
"OutgoingUnbanChatMember",
"{",
"api",
":",
"api",
",",
"Recipient",
":",
"chat... |
881 | all-882 | [
"Write",
"writes",
"a",
"line",
"to",
"the",
"tabwriter",
"."
] | [
"func",
"(",
"w",
"*",
"Writer",
")",
"Write",
"(",
"buf",
"[",
"]",
"byte",
")",
"(",
"int",
",",
"error",
")",
"{",
"if",
"w",
".",
"lines",
">=",
"termHeight",
"{",
"if",
"err",
":=",
"w",
".",
"Flush",
"(",
")",
";",
"err",
"!=",
"nil",
... |
882 | all-883 | [
"Size",
"sets",
"the",
"current",
"page",
"size",
"in",
"pixels",
"."
] | [
"func",
"(",
"p",
"*",
"Page",
")",
"Size",
"(",
"width",
",",
"height",
"int",
")",
"error",
"{",
"window",
",",
"err",
":=",
"p",
".",
"session",
".",
"GetWindow",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"fmt",
".",
"Errorf",
... |
883 | all-884 | [
"CheckAuth",
"validates",
"the",
"credentials",
"by",
"attempting",
"to",
"log",
"into",
"the",
"registry",
"returns",
"an",
"error",
"if",
"an",
"error",
"occurred",
"while",
"making",
"the",
"http",
"request",
"or",
"the",
"status",
"code",
"received",
"was"... | [
"func",
"CheckAuth",
"(",
"ctx",
"context",
".",
"Context",
",",
"sys",
"*",
"types",
".",
"SystemContext",
",",
"username",
",",
"password",
",",
"registry",
"string",
")",
"error",
"{",
"client",
",",
"err",
":=",
"newDockerClient",
"(",
"sys",
",",
"r... |
884 | all-885 | [
"print",
"log",
"in",
"console",
"default",
"log",
"string",
"wont",
"be",
"print",
"in",
"console",
"NOTICE",
":",
"when",
"console",
"is",
"on",
"the",
"process",
"will",
"really",
"slowly"
] | [
"func",
"(",
"f",
"*",
"FileLogger",
")",
"pc",
"(",
"str",
"string",
")",
"{",
"if",
"f",
".",
"logConsole",
"{",
"if",
"log",
".",
"Prefix",
"(",
")",
"!=",
"f",
".",
"prefix",
"{",
"log",
".",
"SetPrefix",
"(",
"f",
".",
"<mask>",
")",
"\n",... |
885 | all-886 | [
"Create",
"a",
"phone",
"number",
"(",
"buy",
"a",
"number",
")",
"with",
"the",
"given",
"values",
".",
"https",
":",
"//",
"www",
".",
"twilio",
".",
"com",
"/",
"docs",
"/",
"api",
"/",
"rest",
"/",
"incoming",
"-",
"phone",
"-",
"numbers#toll",
... | [
"func",
"(",
"n",
"*",
"NumberPurchasingService",
")",
"Create",
"(",
"ctx",
"context",
".",
"Context",
",",
"data",
"<mask>",
".",
"Values",
")",
"(",
"*",
"IncomingPhoneNumber",
",",
"error",
")",
"{",
"number",
":=",
"new",
"(",
"IncomingPhoneNumber",
"... |
886 | all-887 | [
"rotateFile",
"closes",
"the",
"syncBuffer",
"s",
"file",
"and",
"starts",
"a",
"new",
"one",
"."
] | [
"func",
"(",
"sb",
"*",
"syncBuffer",
")",
"rotateFile",
"(",
"now",
"time",
".",
"Time",
")",
"error",
"{",
"if",
"sb",
".",
"file",
"!=",
"nil",
"{",
"sb",
".",
"Flush",
"(",
")",
"\n",
"sb",
".",
"file",
".",
"Close",
"(",
")",
"\n",
"}",
... |
887 | all-888 | [
"NewMongoStore",
"创建敏感词MongoDB存储"
] | [
"func",
"NewMongoStore",
"(",
"config",
"MongoConfig",
")",
"(",
"*",
"MongoStore",
",",
"error",
")",
"{",
"var",
"session",
"*",
"mgo",
".",
"Session",
"\n",
"if",
"config",
".",
"URL",
"!=",
"\"",
"\"",
"{",
"s",
",",
"err",
":=",
"mgo",
".",
"D... |
888 | all-889 | [
"RenderView",
"renders",
"a",
"template",
"using",
"the",
"provided",
"template",
"and",
"vars",
"struct",
"and",
"returns",
"the",
"rendered",
"tamplate"
] | [
"func",
"RenderTemplate",
"(",
"t",
"*",
"template",
".",
"Template",
",",
"vars",
"interface",
"{",
"}",
")",
"[",
"]",
"byte",
"{",
"out",
":=",
"<mask>",
".",
"NewBuffer",
"(",
"nil",
")",
"\n",
"err",
":=",
"t",
".",
"Execute",
"(",
"out",
",",... |
889 | all-890 | [
"New",
"creates",
"a",
"new",
"Err",
"with",
"the",
"given",
"Info",
"and",
"optional",
"public",
"message"
] | [
"func",
"New",
"(",
"info",
"Info",
",",
"publicMsg",
"...",
"interface",
"{",
"}",
")",
"Err",
"{",
"return",
"newErr",
"(",
"<mask>",
".",
"Stack",
"(",
")",
",",
"nil",
",",
"false",
",",
"info",
",",
"publicMsg",
")",
"\n",
"}"
] |
890 | all-891 | [
"NewController",
"returns",
"a",
"new",
"Controller",
"using",
"the",
"specific",
"MAAS",
"server",
"and",
"machine"
] | [
"func",
"NewController",
"(",
"<mask>",
"string",
",",
"key",
"string",
",",
"machine",
"string",
")",
"(",
"*",
"Controller",
",",
"error",
")",
"{",
"baseURL",
":=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"url",
")",
"\n\n",
"// Connect to MAAS",... |
891 | all-892 | [
"GetQuery",
"returns",
"the",
"Query",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"g",
"*",
"GraphEvent",
")",
"GetQuery",
"(",
")",
"string",
"{",
"if",
"g",
"==",
"nil",
"||",
"g",
".",
"Query",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"g",
".",
"<mask>",
"\n",
"}"
] |
892 | all-893 | [
"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",
"(",
"t",
"*",
"Time",
")",
"GetLiveSpanOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"t",
"==",
"nil",
"||",
"t",
".",
"LiveSpan",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"<mask>",
"\n",
"}",
"\n",
"return",
"*",
"t",... |
893 | all-894 | [
"DiskDestroyOperation",
"process",
"the",
"destroy",
"operation",
"for",
"virtual",
"disks",
".",
"Disks",
"are",
"the",
"only",
"real",
"operation",
"that",
"require",
"special",
"destroy",
"logic",
"and",
"that",
"s",
"because",
"we",
"want",
"to",
"check",
... | [
"func",
"DiskDestroyOperation",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"c",
"*",
"govmomi",
".",
"<mask>",
",",
"l",
"object",
".",
"VirtualDeviceList",
")",
"(",
"[",
"]",
"types",
".",
"BaseVirtualDeviceConfigSpec",
",",
"error",
")",
"{",
"l... |
894 | all-895 | [
"Dbgm",
"is",
"a",
"short",
"-",
"hand",
"version",
"of",
"Debugm"
] | [
"func",
"(",
"la",
"*",
"LogAdapter",
")",
"Dbgm",
"(",
"m",
"*",
"Attrs",
",",
"msg",
"string",
",",
"a",
"...",
"<mask>",
"{",
"}",
")",
"error",
"{",
"return",
"la",
".",
"Debugm",
"(",
"m",
",",
"msg",
",",
"a",
"...",
")",
"\n",
"}"
] |
895 | all-896 | [
"TreePathNewFromString",
"is",
"a",
"wrapper",
"around",
"gtk_tree_path_new_from_string",
"()",
"."
] | [
"func",
"TreePathNewFromString",
"(",
"path",
"string",
")",
"(",
"*",
"TreePath",
",",
"error",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"path",
")",
"\n",
"defer",
"C",
".",
"<mask>",
"(",
"unsafe",
".",
"Pointer",
"(",
"cstr",
")",
")",
... |
896 | all-897 | [
"GetExtensions",
"is",
"a",
"wrapper",
"around",
"gdk_pixbuf_format_get_extensions",
"()",
"."
] | [
"func",
"(",
"f",
"*",
"PixbufFormat",
")",
"GetExtensions",
"(",
")",
"[",
"]",
"string",
"{",
"var",
"extensions",
"[",
"]",
"string",
"\n",
"c",
":=",
"C",
".",
"gdk_pixbuf_format_get_extensions",
"(",
"f",
".",
"native",
"(",
")",
")",
"\n",
"if",
... |
897 | all-898 | [
"NewAppInformer",
"constructs",
"a",
"new",
"informer",
"for",
"App",
"type",
".",
"Always",
"prefer",
"using",
"an",
"informer",
"factory",
"to",
"get",
"a",
"shared",
"informer",
"instead",
"of",
"getting",
"an",
"independent",
"one",
".",
"This",
"reduces",... | [
"func",
"NewAppInformer",
"(",
"client",
"versioned",
".",
"Interface",
",",
"namespace",
"string",
",",
"resyncPeriod",
"time",
".",
"Duration",
",",
"indexers",
"<mask>",
".",
"Indexers",
")",
"cache",
".",
"SharedIndexInformer",
"{",
"return",
"NewFilteredAppIn... |
898 | all-899 | [
"commandsForPullRefs",
"returns",
"the",
"list",
"of",
"commands",
"needed",
"to",
"fetch",
"and",
"merge",
"any",
"pull",
"refs",
"as",
"well",
"as",
"submodules",
".",
"These",
"commands",
"should",
"be",
"run",
"only",
"after",
"the",
"commands",
"provided"... | [
"func",
"(",
"g",
"*",
"gitCtx",
")",
"commandsForPullRefs",
"(",
"refs",
"prowapi",
".",
"Refs",
",",
"fakeTimestamp",
"int",
")",
"[",
"]",
"cloneCommand",
"{",
"var",
"commands",
"[",
"]",
"cloneCommand",
"\n",
"for",
"_",
",",
"prRef",
":=",
"range",... |
899 | all-900 | [
"SetMode",
"sets",
"glg",
"logging",
"mode"
] | [
"func",
"(",
"g",
"*",
"Glg",
")",
"SetMode",
"(",
"mode",
"MODE",
")",
"*",
"Glg",
"{",
"g",
".",
"logger",
".",
"Range",
"(",
"func",
"(",
"key",
",",
"val",
"<mask>",
"{",
"}",
")",
"bool",
"{",
"l",
":=",
"val",
".",
"(",
"*",
"logger",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.