id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
700 | all-701 | [
"Sender",
"yields",
"the",
"GossipSender",
"for",
"the",
"named",
"channel",
".",
"It",
"will",
"use",
"the",
"factory",
"function",
"if",
"no",
"sender",
"yet",
"exists",
"."
] | [
"func",
"(",
"gs",
"*",
"gossipSenders",
")",
"Sender",
"(",
"channelName",
"string",
",",
"makeGossipSender",
"func",
"(",
"sender",
"protocolSender",
",",
"stop",
"<-",
"chan",
"struct",
"{",
"}",
")",
"*",
"gossipSender",
")",
"*",
"gossipSender",
"{",
... |
701 | all-702 | [
"snapshot",
"returns",
"a",
"copy",
"of",
"the",
"values",
"of",
"all",
"registered",
"counters",
"and",
"gauges",
"."
] | [
"func",
"(",
"m",
"*",
"CirconusMetrics",
")",
"snapshot",
"(",
")",
"(",
"c",
"map",
"[",
"string",
"]",
"uint64",
",",
"g",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
",",
"h",
"map",
"[",
"string",
"]",
"*",
"circonusllhist",
".",
"Histog... |
702 | all-703 | [
"Camel",
"returns",
"a",
"camelCased",
"string",
"."
] | [
"func",
"(",
"k",
"*",
"Kace",
")",
"Camel",
"(",
"s",
"string",
")",
"string",
"{",
"return",
"camelCase",
"(",
"k",
".",
"t",
",",
"s",
",",
"<mask>",
")",
"\n",
"}"
] |
703 | all-704 | [
"getClientWithoutTimeout",
"returns",
"a",
"modified",
"client",
"that",
"doesn",
"t",
"have",
"the",
"ResponseHeaderTimeout",
"field",
"set",
"in",
"its",
"Transport",
"."
] | [
"func",
"(",
"d",
"*",
"dumpClient",
")",
"getClientWithoutTimeout",
"(",
")",
"*",
"http",
".",
"Client",
"{",
"// Get a copy of the client and modify as multiple concurrent go routines can be using this client.",
"client",
":=",
"*",
"d",
".",
"Client",
"\n",
"tr",
",... |
704 | all-705 | [
"WithObjectGroup",
"symbolic",
"group",
"name",
"that",
"can",
"be",
"used",
"to",
"release",
"the",
"results",
"."
] | [
"func",
"(",
"p",
"QueryObjectsParams",
")",
"WithObjectGroup",
"(",
"objectGroup",
"<mask>",
")",
"*",
"QueryObjectsParams",
"{",
"p",
".",
"ObjectGroup",
"=",
"objectGroup",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
705 | all-706 | [
"WithHTTPClient",
"adds",
"the",
"HTTPClient",
"to",
"the",
"get",
"tasks",
"params"
] | [
"func",
"(",
"o",
"*",
"GetTasksParams",
")",
"WithHTTPClient",
"(",
"client",
"*",
"http",
".",
"Client",
")",
"*",
"GetTasksParams",
"{",
"o",
".",
"SetHTTPClient",
"(",
"<mask>",
")",
"\n",
"return",
"o",
"\n",
"}"
] |
706 | all-707 | [
"String",
"returns",
"a",
"string",
"representation",
"of",
"r",
"."
] | [
"func",
"(",
"r",
"Rectangle",
")",
"<mask>",
"(",
")",
"string",
"{",
"return",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"r",
".",
"Min",
",",
"r",
".",
"Max",
")",
"\n",
"}"
] |
707 | all-708 | [
"UnmarshalJSON",
"implements",
"the",
"json",
".",
"Unmarshaler",
"interface",
"."
] | [
"func",
"(",
"kt",
"*",
"sbKeyType",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"*",
"kt",
"=",
"sbKeyType",
"(",
"\"",
"\"",
")",
"\n",
"<mask>",
"s",
"string",
"\n",
"if",
"err",
":=",
"json",
".",
"Unmarshal",
"(",
... |
708 | all-709 | [
"WithIncludeCommandLineAPI",
"specifies",
"whether",
"command",
"line",
"API",
"should",
"be",
"available",
"to",
"the",
"evaluated",
"expression",
"defaults",
"to",
"false",
"."
] | [
"func",
"(",
"p",
"EvaluateOnCallFrameParams",
")",
"WithIncludeCommandLineAPI",
"(",
"includeCommandLineAPI",
"bool",
")",
"*",
"EvaluateOnCallFrameParams",
"{",
"p",
".",
"IncludeCommandLineAPI",
"=",
"includeCommandLineAPI",
"\n",
"<mask>",
"&",
"p",
"\n",
"}"
] |
709 | all-710 | [
"Tournament",
"related",
"functions",
"and",
"methods",
"Helpers"
] | [
"func",
"validateTournamentInfo",
"(",
"info",
"Info",
")",
"error",
"{",
"if",
"info",
".",
"Scheduled",
".",
"IsZero",
"(",
")",
"{",
"return",
"<mask>",
".",
"New",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"if",
"info",
".",
"Stake",
"==",
"0",
"{... |
710 | all-711 | [
"AddHandler",
"adds",
"event",
"handler",
"to",
"Pinger",
".",
"event",
"arg",
"should",
"be",
"receive",
"or",
"idle",
"string",
".",
"**",
"CAUTION",
"**",
"This",
"function",
"is",
"deprecated",
".",
"Please",
"use",
"OnRecv",
"and",
"OnIdle",
"field",
... | [
"func",
"(",
"p",
"*",
"Pinger",
")",
"AddHandler",
"(",
"event",
"string",
",",
"handler",
"interface",
"{",
"}",
")",
"error",
"{",
"switch",
"event",
"{",
"case",
"\"",
"\"",
":",
"if",
"hdl",
",",
"<mask>",
":=",
"handler",
".",
"(",
"func",
"(... |
711 | all-712 | [
"NextControl",
"returns",
"the",
"next",
"or",
"previous",
"child",
"(",
"depends",
"on",
"next",
"parameter",
")",
"that",
"has",
"tab",
"-",
"stop",
"feature",
"on",
".",
"Used",
"by",
"library",
"when",
"processing",
"TAB",
"key"
] | [
"func",
"NextControl",
"(",
"parent",
"Control",
",",
"curr",
"Control",
",",
"<mask>",
"bool",
")",
"Control",
"{",
"fnTab",
":=",
"func",
"(",
"c",
"Control",
")",
"bool",
"{",
"isVisible",
":=",
"func",
"(",
")",
"bool",
"{",
"ctrl",
":=",
"c",
".... |
712 | all-713 | [
"hasPRChanged",
"indicates",
"that",
"the",
"code",
"diff",
"may",
"have",
"changed",
"."
] | [
"func",
"hasPRChanged",
"(",
"pr",
"github",
".",
"PullRequestEvent",
")",
"bool",
"{",
"switch",
"pr",
".",
"Action",
"{",
"case",
"github",
".",
"PullRequestActionOpened",
":",
"return",
"true",
"\n",
"case",
"github",
".",
"PullRequestActionReopened",
":",
... |
713 | all-714 | [
"handleWindowsRequests",
"is",
"a",
"loop",
"intended",
"to",
"run",
"in",
"a",
"goroutine",
".",
"It",
"handles",
"bidirectional",
"communication",
"with",
"the",
"Windows",
"service",
"manager",
".",
"This",
"function",
"works",
"by",
"pretty",
"much",
"immedi... | [
"func",
"(",
"h",
"*",
"handler",
")",
"handleWindowsRequests",
"(",
"ctx",
"context",
".",
"Context",
",",
"requests",
"<-",
"chan",
"svc",
".",
"ChangeRequest",
",",
"responses",
"chan",
"<-",
"svc",
".",
"Status",
")",
"{",
"// Immediately tell Windows that... |
714 | all-715 | [
"Do",
"executes",
"Network",
".",
"enable",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"EnableParams",
")",
"Do",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandEnable",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
715 | all-716 | [
"/",
"*",
"Close",
"signifies",
"that",
"the",
"buffer",
"will",
"no",
"longer",
"be",
"written",
"to"
] | [
"func",
"(",
"b",
"*",
"Buffer",
")",
"Close",
"(",
")",
"error",
"{",
"b",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"b",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n\n",
"b",
".",
"closed",
"=",
"<mask>",
"\n\n",
"return",
"nil",
"\n",
... |
716 | all-717 | [
"Walk",
"executes",
"a",
"callback",
"against",
"every",
"node",
"in",
"the",
"subtree",
"of",
"path",
"."
] | [
"func",
"(",
"h",
"*",
"dbHashTree",
")",
"Walk",
"(",
"path",
"string",
",",
"f",
"func",
"(",
"path",
"string",
",",
"node",
"*",
"NodeProto",
")",
"error",
")",
"error",
"{",
"path",
"=",
"clean",
"(",
"path",
")",
"\n",
"return",
"h",
".",
"V... |
717 | all-718 | [
"dialWithBalancer",
"dials",
"the",
"client",
"s",
"current",
"load",
"balanced",
"resolver",
"group",
".",
"The",
"scheme",
"of",
"the",
"host",
"of",
"the",
"provided",
"endpoint",
"determines",
"the",
"scheme",
"used",
"for",
"all",
"endpoints",
"of",
"the"... | [
"func",
"(",
"c",
"*",
"Client",
")",
"dialWithBalancer",
"(",
"ep",
"string",
",",
"dopts",
"...",
"grpc",
".",
"DialOption",
")",
"(",
"*",
"grpc",
".",
"ClientConn",
",",
"error",
")",
"{",
"_",
",",
"host",
",",
"_",
":=",
"endpoint",
".",
"Par... |
718 | all-719 | [
"Copy",
"returns",
"a",
"copy",
"of",
"the",
"PeerList",
"as",
"a",
"map",
"from",
"hostPort",
"to",
"peer",
"."
] | [
"func",
"(",
"l",
"*",
"PeerList",
")",
"Copy",
"(",
")",
"map",
"[",
"string",
"]",
"*",
"Peer",
"{",
"l",
".",
"RLock",
"(",
")",
"\n",
"defer",
"l",
".",
"RUnlock",
"(",
")",
"\n\n",
"listCopy",
":=",
"<mask>",
"(",
"map",
"[",
"string",
"]"... |
719 | all-720 | [
"TempFile",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockIOUtil",
")",
"TempFile",
"(",
"arg0",
",",
"arg1",
"string",
")",
"(",
"oswrapper",
".",
"<mask>",
",",
"error",
")",
"{",
"ret",
":=",
"m",
".",
"ctrl",
".",
"Call",
"(",
"m",
",",
"\"",
"\"",
",",
"arg0",
",",
"ar... |
720 | all-721 | [
"ReadBytes",
"returns",
"the",
"next",
"n",
"bytes",
"from",
"the",
"buffer"
] | [
"func",
"(",
"r",
"*",
"ReadBuffer",
")",
"ReadBytes",
"(",
"n",
"int",
")",
"[",
"]",
"<mask>",
"{",
"if",
"r",
".",
"err",
"!=",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
"if",
"len",
"(",
"r",
".",
"remaining",
")",
"<",
"n",
"{",
"r... |
721 | all-722 | [
"With",
"enables",
"the",
"provided",
"feature",
"(",
"ex",
".",
"trustAllSSLCertificates",
")",
"."
] | [
"func",
"(",
"c",
"Capabilities",
")",
"With",
"(",
"feature",
"string",
")",
"Capabilities",
"{",
"c",
"[",
"feature",
"]",
"=",
"<mask>",
"\n",
"return",
"c",
"\n",
"}"
] |
722 | all-723 | [
"CacheRemote",
"receives",
"a",
"handler",
"its",
"cache",
"expiration",
"and",
"the",
"remote",
"address",
"of",
"the",
"remote",
"cache",
"server",
"(",
"look",
"ListenAndServe",
")",
"returns",
"a",
"remote",
"-",
"cached",
"handler",
"You",
"can",
"add",
... | [
"func",
"CacheRemote",
"(",
"bodyHandler",
"<mask>",
".",
"Handler",
",",
"expiration",
"time",
".",
"Duration",
",",
"remoteServerAddr",
"string",
")",
"*",
"nethttp",
".",
"ClientHandler",
"{",
"return",
"nethttp",
".",
"NewClientHandler",
"(",
"bodyHandler",
... |
723 | all-724 | [
"Format",
"implements",
"fmt",
".",
"Formatter",
"by",
"printing",
"the",
"Trace",
"as",
"square",
"brackes",
"(",
"[",
"]",
")",
"surrounding",
"a",
"space",
"separated",
"list",
"of",
"Calls",
"each",
"formatted",
"with",
"the",
"supplied",
"verb",
"and",
... | [
"func",
"(",
"pcs",
"Trace",
")",
"Format",
"(",
"s",
"fmt",
".",
"State",
",",
"c",
"rune",
")",
"{",
"s",
".",
"Write",
"(",
"[",
"]",
"byte",
"(",
"\"",
"\"",
")",
")",
"\n",
"for",
"i",
",",
"pc",
":=",
"<mask>",
"pcs",
"{",
"if",
"i",
... |
724 | all-725 | [
"newDnsimpleChanges",
"returns",
"a",
"slice",
"of",
"changes",
"based",
"on",
"given",
"action",
"and",
"record"
] | [
"func",
"newDnsimpleChanges",
"(",
"<mask>",
"string",
",",
"endpoints",
"[",
"]",
"*",
"endpoint",
".",
"Endpoint",
")",
"[",
"]",
"*",
"dnsimpleChange",
"{",
"changes",
":=",
"make",
"(",
"[",
"]",
"*",
"dnsimpleChange",
",",
"0",
",",
"len",
"(",
"e... |
725 | all-726 | [
"ReceiveComment",
"is",
"a",
"wrapper",
"on",
"plugin",
".",
"ReceiveComment",
"()"
] | [
"func",
"(",
"o",
"*",
"FakeOpenPluginWrapper",
")",
"ReceiveComment",
"(",
"comment",
"sql",
".",
"<mask>",
")",
"[",
"]",
"Point",
"{",
"return",
"o",
".",
"plugin",
".",
"ReceiveComment",
"(",
"comment",
")",
"\n",
"}"
] |
726 | all-727 | [
"SyncResources",
"will",
"update",
"resources",
"every",
"10",
"mins",
".",
"It",
"will",
"append",
"newly",
"added",
"resources",
"to",
"ranch",
".",
"Resources",
"And",
"try",
"to",
"remove",
"newly",
"deleted",
"resources",
"from",
"ranch",
".",
"Resources"... | [
"func",
"(",
"s",
"*",
"Storage",
")",
"SyncResources",
"(",
"data",
"[",
"]",
"common",
".",
"Resource",
")",
"error",
"{",
"s",
".",
"resourcesLock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"s",
".",
"resourcesLock",
".",
"Unlock",
"(",
")",
"\n\n",
... |
727 | all-728 | [
"HasStart",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"m",
"*",
"ManageStatusDefinition",
")",
"HasStart",
"(",
")",
"bool",
"{",
"if",
"m",
"!=",
"nil",
"&&",
"m",
".",
"Start",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
728 | all-729 | [
"Detect",
"detects",
"user",
"s",
"current",
"shell",
"."
] | [
"func",
"Detect",
"(",
")",
"(",
"string",
",",
"error",
")",
"{",
"shell",
":=",
"<mask>",
".",
"Getenv",
"(",
"\"",
"\"",
")",
"\n\n",
"if",
"shell",
"==",
"\"",
"\"",
"{",
"fmt",
".",
"Printf",
"(",
"\"",
"\\n",
"\\n",
"\"",
")",
"\n",
"retu... |
729 | all-730 | [
"Returns",
"a",
"Point"
] | [
"func",
"(",
"p",
"CvPoint",
")",
"ToPoint",
"(",
")",
"<mask>",
"{",
"return",
"Point",
"{",
"int",
"(",
"p",
".",
"x",
")",
",",
"int",
"(",
"p",
".",
"y",
")",
"}",
"\n",
"}"
] |
730 | all-731 | [
"WithLogFunc",
"sets",
"the",
"function",
"that",
"will",
"perform",
"message",
"logging",
".",
"Default",
"is",
"log",
".",
"Printf",
"."
] | [
"func",
"WithLogFunc",
"(",
"logf",
"func",
"(",
"format",
"string",
",",
"a",
"...",
"<mask>",
"{",
"}",
")",
")",
"Option",
"{",
"return",
"func",
"(",
"o",
"*",
"Handler",
")",
"{",
"o",
".",
"logf",
"=",
"logf",
"}",
"\n",
"}"
] |
731 | all-732 | [
"SAMLRequests",
"returns",
"the",
"saml_requests",
"from",
"MongoDB",
"."
] | [
"func",
"(",
"s",
"*",
"Storage",
")",
"SAMLRequests",
"(",
")",
"*",
"storage",
".",
"Collection",
"{",
"id",
":=",
"mgo",
".",
"Index",
"{",
"Key",
":",
"[",
"]",
"string",
"{",
"\"",
"\"",
"}",
"}",
"\n",
"coll",
":=",
"s",
".",
"Collection",
... |
732 | all-733 | [
"WithYDistance",
"the",
"distance",
"to",
"scroll",
"along",
"the",
"Y",
"axis",
"(",
"positive",
"to",
"scroll",
"up",
")",
"."
] | [
"func",
"(",
"p",
"SynthesizeScrollGestureParams",
")",
"WithYDistance",
"(",
"yDistance",
"float64",
")",
"*",
"SynthesizeScrollGestureParams",
"{",
"p",
".",
"YDistance",
"=",
"yDistance",
"\n",
"<mask>",
"&",
"p",
"\n",
"}"
] |
733 | all-734 | [
"GetEnum",
"is",
"a",
"wrapper",
"around",
"g_settings_get_enum",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Settings",
")",
"GetEnum",
"(",
"name",
"string",
")",
"int",
"{",
"cstr1",
":=",
"(",
"*",
"C",
".",
"gchar",
")",
"(",
"C",
".",
"CString",
"(",
"name",
")",
")",
"\n",
"defer",
"C",
".",
"<mask>",
"(",
"unsafe",
".",
... |
734 | all-735 | [
"HandleRedirect",
"handles",
"the",
"redirection",
"from",
"GitHub",
".",
"It",
"exchanges",
"the",
"code",
"from",
"redirect",
"URL",
"for",
"user",
"access",
"token",
".",
"The",
"access",
"token",
"is",
"then",
"saved",
"to",
"the",
"cookie",
"and",
"the"... | [
"func",
"(",
"ga",
"*",
"Agent",
")",
"HandleRedirect",
"(",
"client",
"OAuthClient",
",",
"getter",
"GitHubClientGetter",
")",
"<mask>",
".",
"HandlerFunc",
"{",
"return",
"func",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Reque... |
735 | all-736 | [
"export",
"FrameSet_Copy"
] | [
"func",
"FrameSet_Copy",
"(",
"id",
"FrameSetId",
")",
"FrameSetId",
"{",
"fs",
",",
"ok",
":=",
"sFrameSets",
".",
"Get",
"(",
"<mask>",
")",
"\n",
"if",
"!",
"ok",
"{",
"return",
"0",
"\n",
"}",
"\n\n",
"copyFs",
",",
"_",
":=",
"fileseq",
".",
"... |
736 | all-737 | [
"Creates",
"a",
"new",
"cache",
"instance"
] | [
"func",
"New",
"(",
")",
"*",
"Cache",
"{",
"c",
":=",
"&",
"Cache",
"{",
"data",
":",
"make",
"(",
"[",
"]",
"*",
"Shard",
",",
"shardCount",
")",
",",
"writeStrategy",
":",
"Noop",
",",
"}",
"\n\n",
"for",
"i",
":=",
"0",
";",
"i",
"<",
"sh... |
737 | all-738 | [
"Results",
"retrieves",
"the",
"completed",
"jobs",
"."
] | [
"func",
"(",
"pool",
"*",
"Pool",
")",
"Results",
"(",
")",
"(",
"res",
"[",
"]",
"*",
"<mask>",
")",
"{",
"res",
"=",
"make",
"(",
"[",
"]",
"*",
"Job",
",",
"pool",
".",
"jobs_completed",
".",
"Len",
"(",
")",
")",
"\n",
"i",
":=",
"0",
"... |
738 | all-739 | [
"readPartial",
"keeps",
"reading",
"from",
"reader",
"into",
"provided",
"buffer",
"until",
"buffer",
"size",
"reaches",
"exactly",
"n2",
".",
"n1",
"is",
"initial",
"buffer",
"size",
".",
"useful",
"to",
"ensure",
"we",
"get",
"an",
"specific",
"buffer",
"s... | [
"func",
"readPartial",
"(",
"c",
"*",
"Cmp",
",",
"r",
"<mask>",
".",
"Reader",
",",
"buf",
"[",
"]",
"byte",
",",
"n1",
",",
"n2",
"int",
")",
"(",
"int",
",",
"error",
")",
"{",
"for",
"n1",
"<",
"n2",
"{",
"n",
",",
"err",
":=",
"c",
"."... |
739 | all-740 | [
"TearDown",
"implements",
"storage",
"interface",
"."
] | [
"func",
"(",
"s",
"*",
"Storage",
")",
"TearDown",
"(",
")",
"error",
"{",
"_",
",",
"err",
":=",
"s",
".",
"<mask>",
".",
"Exec",
"(",
"`DROP SCHEMA IF EXISTS `",
"+",
"s",
".",
"schema",
"+",
"` CASCADE`",
")",
"\n\n",
"return",
"err",
"\n",
"}"
] |
740 | all-741 | [
"ParseLine",
"makes",
"a",
"new",
"Line",
"with",
"the",
"given",
"data",
"."
] | [
"func",
"ParseLine",
"(",
"n",
"int",
",",
"unsafeText",
"[",
"]",
"byte",
")",
"(",
"*",
"Line",
",",
"error",
")",
"{",
"linetype",
":=",
"LineTypePlain",
"\n",
"// trim off comments",
"var",
"comment",
"[",
"]",
"byte",
"\n",
"text",
":=",
"make",
"... |
741 | all-742 | [
"Children",
"returns",
"a",
"slice",
"of",
"children",
"of",
"the",
"receiving",
"ZFS",
"dataset",
".",
"A",
"recursion",
"depth",
"may",
"be",
"specified",
"or",
"a",
"depth",
"of",
"0",
"allows",
"unlimited",
"recursion",
"."
] | [
"func",
"(",
"d",
"*",
"Dataset",
")",
"Children",
"(",
"depth",
"uint64",
")",
"(",
"[",
"]",
"*",
"Dataset",
",",
"error",
")",
"{",
"args",
":=",
"[",
"]",
"string",
"{",
"\"",
"\"",
"}",
"\n",
"if",
"depth",
">",
"0",
"{",
"args",
"=",
"a... |
742 | all-743 | [
"Converts",
"options",
"into",
"CORS",
"headers",
"for",
"a",
"preflight",
"response",
"."
] | [
"func",
"(",
"o",
"*",
"Options",
")",
"PreflightHeader",
"(",
"origin",
",",
"rMethod",
",",
"rHeaders",
"string",
")",
"(",
"<mask>",
"map",
"[",
"string",
"]",
"string",
")",
"{",
"headers",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"string",
"... |
743 | all-744 | [
"NewSimpleClientset",
"returns",
"a",
"clientset",
"that",
"will",
"respond",
"with",
"the",
"provided",
"objects",
".",
"It",
"s",
"backed",
"by",
"a",
"very",
"simple",
"object",
"tracker",
"that",
"processes",
"creates",
"updates",
"and",
"deletions",
"as",
... | [
"func",
"NewSimpleClientset",
"(",
"objects",
"...",
"runtime",
".",
"Object",
")",
"*",
"Clientset",
"{",
"o",
":=",
"testing",
".",
"NewObjectTracker",
"(",
"scheme",
",",
"codecs",
".",
"UniversalDecoder",
"(",
")",
")",
"\n",
"for",
"_",
",",
"obj",
... |
744 | all-745 | [
"AddNetworkList",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockCNI",
")",
"AddNetworkList",
"(",
"arg0",
"*",
"libcni",
".",
"NetworkConfigList",
",",
"arg1",
"*",
"libcni",
".",
"RuntimeConf",
")",
"(",
"types",
".",
"Result",
",",
"error",
")",
"{",
"ret",
":=",
"m",
".",
"ctrl",
".... |
745 | all-746 | [
"ApplicationNew",
"is",
"a",
"wrapper",
"around",
"gtk_application_new",
"()",
"."
] | [
"func",
"ApplicationNew",
"(",
"appId",
"string",
",",
"<mask>",
"glib",
".",
"ApplicationFlags",
")",
"(",
"*",
"Application",
",",
"error",
")",
"{",
"cstr",
":=",
"(",
"*",
"C",
".",
"gchar",
")",
"(",
"C",
".",
"CString",
"(",
"appId",
")",
")",
... |
746 | all-747 | [
"/",
"*",
"Using",
"presence",
"channels",
"is",
"similar",
"to",
"private",
"channels",
"but",
"in",
"order",
"to",
"identify",
"a",
"user",
"clients",
"are",
"sent",
"a",
"user_id",
"and",
"optionally",
"custom",
"data",
"."
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"AuthenticatePresenceChannel",
"(",
"params",
"[",
"]",
"byte",
",",
"member",
"MemberData",
")",
"(",
"response",
"[",
"]",
"<mask>",
",",
"err",
"error",
")",
"{",
"return",
"c",
".",
"authenticateChannel",
"(",
"p... |
747 | all-748 | [
"getImageState",
"returns",
"the",
"ImageState",
"object",
"that",
"the",
"container",
"is",
"referenced",
"at"
] | [
"func",
"(",
"imageManager",
"*",
"dockerImageManager",
")",
"getImageState",
"(",
"containerImageID",
"string",
")",
"(",
"*",
"image",
".",
"ImageState",
",",
"bool",
")",
"{",
"for",
"_",
",",
"imageState",
":=",
"range",
"imageManager",
".",
"getAllImageSt... |
748 | all-749 | [
"CallSC",
"makes",
"a",
"call",
"using",
"the",
"given",
"subcahnnel"
] | [
"func",
"CallSC",
"(",
"ctx",
"context",
".",
"Context",
",",
"sc",
"*",
"tchannel",
".",
"SubChannel",
",",
"<mask>",
"string",
",",
"arg2",
",",
"arg3",
"[",
"]",
"byte",
")",
"(",
"[",
"]",
"byte",
",",
"[",
"]",
"byte",
",",
"*",
"tchannel",
... |
749 | all-750 | [
"PutBlob",
"writes",
"contents",
"of",
"stream",
"and",
"returns",
"data",
"representing",
"the",
"result",
".",
"inputInfo",
".",
"Digest",
"can",
"be",
"optionally",
"provided",
"if",
"known",
";",
"it",
"is",
"not",
"mandatory",
"for",
"the",
"implementatio... | [
"func",
"(",
"s",
"*",
"storageImageDestination",
")",
"PutBlob",
"(",
"ctx",
"context",
".",
"Context",
",",
"stream",
"io",
".",
"Reader",
",",
"blobinfo",
"types",
".",
"BlobInfo",
",",
"cache",
"types",
".",
"BlobInfoCache",
",",
"isConfig",
"bool",
")... |
750 | all-751 | [
"Verify",
"checks",
"a",
"signature",
"agains",
"the",
"input",
"data",
"."
] | [
"func",
"(",
"k",
"*",
"Ed25519PublicKey",
")",
"Verify",
"(",
"data",
"[",
"]",
"byte",
",",
"sig",
"[",
"]",
"byte",
")",
"(",
"bool",
",",
"error",
")",
"{",
"return",
"ed25519",
".",
"Verify",
"(",
"k",
".",
"k",
",",
"<mask>",
",",
"sig",
... |
751 | all-752 | [
"appendDefaultEgressIgnoredIPs",
"append",
"task",
"metadata",
"endpoint",
"ip",
"and",
"instance",
"metadata",
"ip",
"address",
"to",
"egress",
"ignored",
"IPs",
"if",
"does",
"not",
"exist"
] | [
"func",
"appendDefaultEgressIgnoredIPs",
"(",
"egressIgnoredIPs",
"[",
"]",
"string",
")",
"[",
"]",
"string",
"{",
"hasTaskMetadataEndpointIP",
":=",
"false",
"\n",
"hasInstanceMetadataEndpointIP",
":=",
"false",
"\n",
"for",
"_",
",",
"egressIgnoredIP",
":=",
"ran... |
752 | all-753 | [
"MakeLang",
"returns",
"slug",
"generated",
"from",
"provided",
"string",
"and",
"will",
"use",
"provided",
"language",
"for",
"chars",
"substitution",
"."
] | [
"func",
"MakeLang",
"(",
"s",
"string",
",",
"lang",
"string",
")",
"(",
"slug",
"string",
")",
"{",
"slug",
"=",
"strings",
".",
"TrimSpace",
"(",
"s",
")",
"\n\n",
"// Custom substitutions",
"// Always substitute runes first",
"slug",
"=",
"SubstituteRune",
... |
753 | all-754 | [
"cleanupVM",
"cleans",
"up",
"VM",
"VIX",
"handle",
"."
] | [
"func",
"cleanupVM",
"(",
"v",
"*",
"VM",
")",
"{",
"if",
"v",
".",
"handle",
"!=",
"C",
".",
"VIX_INVALID_HANDLE",
"{",
"C",
".",
"Vix_ReleaseHandle",
"(",
"v",
".",
"<mask>",
")",
"\n",
"v",
".",
"handle",
"=",
"C",
".",
"VIX_INVALID_HANDLE",
"\n",... |
754 | all-755 | [
"Put",
"implements",
"gRPC",
"KVServer",
".",
"Put",
"puts",
"the",
"given",
"key",
"into",
"the",
"store",
".",
"A",
"put",
"request",
"increases",
"the",
"revision",
"of",
"the",
"store",
"and",
"generates",
"one",
"event",
"in",
"the",
"event",
"history... | [
"func",
"(",
"s",
"*",
"etcdStore",
")",
"Put",
"(",
"ctx",
"context",
".",
"Context",
",",
"req",
"*",
"etcdserverpb",
".",
"PutRequest",
")",
"(",
"*",
"etcdserverpb",
".",
"PutResponse",
",",
"error",
")",
"{",
"ireq",
":=",
"etcdserverpb",
".",
"In... |
755 | all-756 | [
"GetIntegrationAWS",
"gets",
"all",
"the",
"AWS",
"Accounts",
"in",
"the",
"AWS",
"Integrations",
"from",
"Datadog",
"."
] | [
"func",
"(",
"client",
"*",
"Client",
")",
"GetIntegrationAWS",
"(",
")",
"(",
"*",
"[",
"]",
"IntegrationAWSAccount",
",",
"error",
")",
"{",
"var",
"<mask>",
"IntegrationAWSAccountGetResponse",
"\n",
"if",
"err",
":=",
"client",
".",
"doJsonRequest",
"(",
... |
756 | all-757 | [
"CreateJob",
"creates",
"a",
"new",
"job",
"based",
"on",
"the",
"provided",
"structure",
"."
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"CreateJob",
"(",
"job",
"*",
"JobDetail",
")",
"(",
"*",
"JobSummary",
",",
"error",
")",
"{",
"return",
"c",
".",
"importJob",
"(",
"<mask>",
",",
"\"",
"\"",
")",
"\n",
"}"
] |
757 | all-758 | [
"NewAuthenticatedMessage",
"creates",
"a",
"new",
"AuthenticatedMessage",
"."
] | [
"func",
"NewAuthenticatedMessage",
"(",
"v",
"Uint32",
",",
"value",
"<mask>",
"{",
"}",
")",
"(",
"result",
"AuthenticatedMessage",
",",
"err",
"error",
")",
"{",
"result",
".",
"V",
"=",
"v",
"\n",
"switch",
"Uint32",
"(",
"v",
")",
"{",
"case",
"0",... |
758 | all-759 | [
"grabEncodeTargets",
"grabs",
"the",
"fields",
"for",
"the",
"obj",
"."
] | [
"func",
"grabEncodeTargets",
"(",
"alg",
"Algorithm",
",",
"obj",
"interface",
"{",
"}",
")",
"(",
"interface",
"{",
"}",
",",
"interface",
"{",
"}",
",",
"error",
")",
"{",
"<mask>",
"headerObj",
",",
"payloadObj",
"interface",
"{",
"}",
"\n\n",
"// get... |
759 | all-760 | [
"TimeOrderedUUID",
"generates",
"a",
"time",
"ordered",
"UUID",
".",
"Top",
"32b",
"are",
"timestamp",
"bottom",
"96b",
"are",
"random",
"."
] | [
"func",
"TimeOrderedUUID",
"(",
")",
"string",
"{",
"unixTime",
":=",
"uint32",
"(",
"time",
".",
"Now",
"(",
")",
".",
"UTC",
"(",
")",
".",
"Unix",
"(",
")",
")",
"\n",
"return",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"unixTime",
",",
"ra... |
760 | all-761 | [
"OptImportSort",
"tells",
"the",
"importer",
"whether",
"or",
"not",
"to",
"sort",
"batches",
"of",
"records",
"on",
"by",
"default",
".",
"Sorting",
"imposes",
"some",
"performance",
"cost",
"especially",
"on",
"data",
"that",
"s",
"already",
"sorted",
"but",... | [
"func",
"OptImportSort",
"(",
"sorting",
"bool",
")",
"ImportOption",
"{",
"return",
"func",
"(",
"<mask>",
"*",
"ImportOptions",
")",
"error",
"{",
"// skipSort is expressed negatively because we want to",
"// keep sorting enabled by default, so the zero value should",
"// be ... |
761 | all-762 | [
"Readable",
"reports",
"whether",
"the",
"address",
"a",
"is",
"readable",
"."
] | [
"func",
"(",
"p",
"*",
"<mask>",
")",
"Readable",
"(",
"a",
"Address",
")",
"bool",
"{",
"return",
"p",
".",
"findMapping",
"(",
"a",
")",
"!=",
"nil",
"\n",
"}"
] |
762 | all-763 | [
"Expiration",
"sets",
"the",
"expiration",
"time",
"of",
"the",
"auth",
"token"
] | [
"func",
"Expiration",
"(",
"e",
"<mask>",
".",
"Duration",
")",
"TokenOpt",
"{",
"return",
"TokenOpt",
"{",
"func",
"(",
"o",
"*",
"options",
")",
"{",
"o",
".",
"expiration",
"=",
"e",
"\n",
"}",
"}",
"\n",
"}"
] |
763 | all-764 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"AttachToTargetParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget29",
"(",
"&",
"w",
",",
"v",
"... |
764 | all-765 | [
"GetContacts",
"gets",
"a",
"users",
"contacts"
] | [
"func",
"(",
"c",
"<mask>",
")",
"GetContacts",
"(",
"params",
"*",
"ContactsParams",
")",
"(",
"*",
"contactsHolder",
",",
"error",
")",
"{",
"holder",
":=",
"contactsHolder",
"{",
"}",
"\n",
"if",
"err",
":=",
"c",
".",
"Get",
"(",
"\"",
"\"",
",",... |
765 | all-766 | [
"Restore",
"restores",
"the",
"terminal",
"connected",
"to",
"the",
"given",
"file",
"descriptor",
"to",
"a",
"previous",
"state",
"."
] | [
"func",
"Restore",
"(",
"fd",
"int",
",",
"state",
"*",
"State",
")",
"error",
"{",
"ret",
",",
"err",
":=",
"C",
".",
"tcsetattr",
"(",
"C",
".",
"int",
"(",
"fd",
")",
",",
"C",
".",
"TCSANOW",
",",
"(",
"*",
"C",
".",
"struct_termios",
")",
... |
766 | all-767 | [
"PrintBranch",
"pretty",
"-",
"prints",
"a",
"Branch",
"."
] | [
"func",
"PrintBranch",
"(",
"w",
"io",
".",
"Writer",
",",
"branchInfo",
"*",
"pfs",
".",
"BranchInfo",
")",
"{",
"fmt",
".",
"Fprintf",
"(",
"w",
",",
"\"",
"\\t",
"\"",
",",
"branchInfo",
".",
"Branch",
".",
"Name",
")",
"\n",
"if",
"branchInfo",
... |
767 | all-768 | [
"Load",
"a",
"backup",
"from",
"the",
"database"
] | [
"func",
"backupLoadByName",
"(",
"s",
"*",
"state",
".",
"State",
",",
"project",
",",
"name",
"string",
")",
"(",
"*",
"backup",
",",
"error",
")",
"{",
"// Get the backup database record",
"args",
",",
"err",
":=",
"s",
".",
"Cluster",
".",
"ContainerGet... |
768 | all-769 | [
"ContainerBackupRemove",
"removes",
"the",
"container",
"backup",
"with",
"the",
"given",
"name",
"from",
"the",
"database",
"."
] | [
"func",
"(",
"c",
"*",
"Cluster",
")",
"ContainerBackupRemove",
"(",
"name",
"string",
")",
"error",
"{",
"id",
",",
"err",
":=",
"c",
".",
"ContainerBackupID",
"(",
"name",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n\n"... |
769 | all-770 | [
"GetContainerServer",
"returns",
"a",
"ContainerServer",
"struct",
"for",
"the",
"remote"
] | [
"func",
"(",
"c",
"*",
"Config",
")",
"GetContainerServer",
"(",
"name",
"string",
")",
"(",
"lxd",
".",
"ContainerServer",
",",
"error",
")",
"{",
"// Get the remote",
"remote",
",",
"ok",
":=",
"c",
".",
"Remotes",
"[",
"name",
"]",
"\n",
"if",
"!",
... |
770 | all-771 | [
"pushMsg",
"pushes",
"a",
"message",
"performing",
"validation",
"as",
"necessary"
] | [
"func",
"(",
"p",
"*",
"PubSub",
")",
"pushMsg",
"(",
"vals",
"[",
"]",
"*",
"topicVal",
",",
"src",
"peer",
".",
"ID",
",",
"msg",
"*",
"Message",
")",
"{",
"// reject messages from blacklisted peers",
"if",
"p",
".",
"blacklist",
".",
"Contains",
"(",
... |
771 | all-772 | [
"KnownCreated",
"returns",
"true",
"if",
"the",
"volume",
"s",
"known",
"status",
"is",
"CREATED"
] | [
"func",
"(",
"vol",
"*",
"VolumeResource",
")",
"KnownCreated",
"(",
")",
"bool",
"{",
"vol",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"vol",
".",
"<mask>",
".",
"RUnlock",
"(",
")",
"\n\n",
"return",
"vol",
".",
"knownStatusUnsafe",
"==",
... |
772 | all-773 | [
"GetBoolStringPtr",
"reads",
"a",
"ResourceData",
"*",
"string",
"*",
"field",
".",
"This",
"field",
"is",
"handled",
"in",
"the",
"following",
"way",
":",
"*",
"If",
"it",
"s",
"empty",
"nil",
"is",
"returned",
".",
"*",
"The",
"string",
"is",
"then",
... | [
"func",
"GetBoolStringPtr",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"key",
"string",
")",
"(",
"*",
"bool",
",",
"error",
")",
"{",
"v",
",",
"ok",
":=",
"d",
".",
"GetOk",
"(",
"<mask>",
")",
"\n",
"if",
"!",
"ok",
"{",
"return",
"nil... |
773 | all-774 | [
"GetPublicKey",
"retrieves",
"the",
"public",
"key",
"associated",
"with",
"the",
"given",
"peer",
"ID",
"from",
"the",
"value",
"store",
".",
"If",
"the",
"ValueStore",
"is",
"also",
"a",
"PubKeyFetcher",
"this",
"method",
"will",
"call",
"GetPublicKey",
"(",... | [
"func",
"GetPublicKey",
"(",
"r",
"ValueStore",
",",
"ctx",
"context",
".",
"Context",
",",
"p",
"peer",
".",
"ID",
")",
"(",
"ci",
".",
"PubKey",
",",
"error",
")",
"{",
"switch",
"k",
",",
"err",
":=",
"p",
".",
"ExtractPublicKey",
"(",
")",
";",... |
774 | all-775 | [
"Append",
"is",
"a",
"wrapper",
"around",
"gtk_combo_box_text_append",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"ComboBoxText",
")",
"Append",
"(",
"id",
",",
"text",
"string",
")",
"{",
"cid",
":=",
"C",
".",
"CString",
"(",
"id",
")",
"\n",
"ctext",
":=",
"C",
".",
"CString",
"(",
"text",
")",
"\n",
"defer",
"C",
".",
"free",
"("... |
775 | all-776 | [
"ValidEnum",
"validates",
"a",
"proposed",
"value",
"for",
"this",
"enum",
".",
"Implements",
"the",
"Enum",
"interface",
"for",
"OfferEntryFlags"
] | [
"func",
"(",
"e",
"OfferEntryFlags",
")",
"ValidEnum",
"(",
"v",
"int32",
")",
"bool",
"{",
"_",
",",
"ok",
":=",
"offerEntryFlagsMap",
"[",
"v",
"]",
"\n",
"return",
"<mask>",
"\n",
"}"
] |
776 | all-777 | [
"title",
":",
"delete",
"app",
"router",
"path",
":",
"/",
"app",
"/",
"{",
"app",
"}",
"/",
"routers",
"/",
"{",
"router",
"}",
"method",
":",
"DELETE",
"produce",
":",
"application",
"/",
"json",
"responses",
":",
"200",
":",
"OK",
"404",
":",
"A... | [
"func",
"removeAppRouter",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"t",
"auth",
".",
"Token",
")",
"(",
"err",
"error",
")",
"{",
"appName",
":=",
"r",
".",
"URL",
".",
"Query",
"(",
")",
".",
"Get",
"... |
777 | all-778 | [
"Close",
"forces",
"closing",
"all",
"sockets",
"that",
"are",
"alive",
"whether",
"they",
"re",
"currently",
"in",
"use",
"or",
"not",
"."
] | [
"func",
"(",
"<mask>",
"*",
"mongoServer",
")",
"Close",
"(",
")",
"{",
"server",
".",
"Lock",
"(",
")",
"\n",
"server",
".",
"closed",
"=",
"true",
"\n",
"liveSockets",
":=",
"server",
".",
"liveSockets",
"\n",
"unusedSockets",
":=",
"server",
".",
"u... |
778 | all-779 | [
"PreCreateCheck",
"allows",
"for",
"pre",
"-",
"create",
"operations",
"to",
"make",
"sure",
"a",
"driver",
"is",
"ready",
"for",
"creation"
] | [
"func",
"(",
"d",
"*",
"Driver",
")",
"PreCreateCheck",
"(",
")",
"error",
"{",
"if",
"d",
".",
"UserDataFile",
"!=",
"\"",
"\"",
"{",
"if",
"_",
",",
"err",
":=",
"<mask>",
".",
"Stat",
"(",
"d",
".",
"UserDataFile",
")",
";",
"os",
".",
"IsNotE... |
779 | all-780 | [
"NewDefaultStatusPolicy",
"returns",
"a",
"status",
"policy",
"that",
"assigns",
"relative",
"severity",
"in",
"accordance",
"with",
"conventional",
"Nagios",
"plugin",
"return",
"codes",
".",
"Statuses",
"associated",
"with",
"higher",
"return",
"codes",
"are",
"mo... | [
"func",
"NewDefaultStatusPolicy",
"(",
")",
"*",
"statusPolicy",
"{",
"return",
"&",
"statusPolicy",
"{",
"<mask>",
":",
"statusSeverity",
"(",
"OK",
")",
",",
"WARNING",
":",
"statusSeverity",
"(",
"WARNING",
")",
",",
"CRITICAL",
":",
"statusSeverity",
"(",
... |
780 | all-781 | [
"IntVar",
"defines",
"an",
"int",
"flag",
"with",
"specified",
"name",
"default",
"value",
"and",
"usage",
"string",
".",
"The",
"argument",
"p",
"points",
"to",
"an",
"int",
"variable",
"in",
"which",
"to",
"store",
"the",
"value",
"of",
"the",
"flag",
... | [
"func",
"IntVar",
"(",
"p",
"*",
"int",
",",
"name",
"string",
",",
"value",
"int",
",",
"usage",
"string",
")",
"{",
"EnvironmentFlags",
".",
"IntVar",
"(",
"p",
",",
"name",
",",
"<mask>",
",",
"usage",
")",
"\n",
"}"
] |
781 | all-782 | [
"UnmarshalYAML",
"implements",
"the",
"yaml",
".",
"Unmarshaler",
"interface",
"."
] | [
"func",
"(",
"c",
"*",
"ServersetSDConfig",
")",
"UnmarshalYAML",
"(",
"unmarshal",
"func",
"(",
"interface",
"{",
"}",
")",
"error",
")",
"error",
"{",
"*",
"c",
"=",
"DefaultServersetSDConfig",
"\n",
"type",
"<mask>",
"ServersetSDConfig",
"\n",
"err",
":="... |
782 | all-783 | [
"Detach",
"a",
"slave",
"from",
"a",
"bridge",
"device",
".",
"This",
"is",
"more",
"backward",
"-",
"compatible",
"than",
"netlink",
".",
"NetworkSetMaster",
"and",
"works",
"on",
"RHEL",
"6",
"."
] | [
"func",
"DelFromBridge",
"(",
"iface",
",",
"master",
"*",
"<mask>",
".",
"Interface",
")",
"error",
"{",
"return",
"ifIoctBridge",
"(",
"iface",
",",
"master",
",",
"SIOC_BRDELIF",
")",
"\n",
"}"
] |
783 | all-784 | [
"processRPC",
"is",
"called",
"to",
"handle",
"an",
"incoming",
"RPC",
"request",
".",
"This",
"must",
"only",
"be",
"called",
"from",
"the",
"main",
"thread",
"."
] | [
"func",
"(",
"r",
"*",
"Raft",
")",
"processRPC",
"(",
"rpc",
"RPC",
")",
"{",
"if",
"err",
":=",
"r",
".",
"checkRPCHeader",
"(",
"rpc",
")",
";",
"err",
"!=",
"nil",
"{",
"rpc",
".",
"Respond",
"(",
"nil",
",",
"err",
")",
"\n",
"return",
"\n... |
784 | all-785 | [
"Root",
"returns",
"the",
"portion",
"of",
"an",
"import",
"path",
"that",
"corresponds",
"to",
"the",
"root",
"directory",
"of",
"the",
"repository",
"containing",
"the",
"given",
"import",
"path",
".",
"For",
"example",
"given",
"golang",
".",
"org",
"/",
... | [
"func",
"(",
"r",
"*",
"RemoteCache",
")",
"Root",
"(",
"importPath",
"string",
")",
"(",
"root",
",",
"name",
"string",
",",
"err",
"error",
")",
"{",
"// Try prefixes of the import path in the cache, but don't actually go out",
"// to vcs yet. We do this before handling... |
785 | all-786 | [
"resourceVSphereComputeClusterVMGroupObjects",
"handles",
"the",
"fetching",
"of",
"the",
"cluster",
"and",
"group",
"name",
"depending",
"on",
"what",
"attributes",
"are",
"available",
":",
"*",
"If",
"the",
"resource",
"ID",
"is",
"available",
"the",
"data",
"is... | [
"func",
"resourceVSphereComputeClusterVMGroupObjects",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"meta",
"<mask>",
"{",
"}",
",",
")",
"(",
"*",
"object",
".",
"ClusterComputeResource",
",",
"string",
",",
"error",
")",
"{",
"if",
"d",
".",
"Id",
... |
786 | all-787 | [
"Write",
"serializes",
"the",
"frame",
"to",
"the",
"given",
"buffered",
"output",
"satisfies",
"the",
"Frame",
"interface",
"."
] | [
"func",
"(",
"f",
"UnknownFrame",
")",
"Write",
"(",
"w",
"*",
"bufio",
".",
"Writer",
")",
"(",
"err",
"error",
")",
"{",
"if",
"err",
"=",
"writeFrameHeader",
"(",
"w",
",",
"f",
".",
"<mask>",
",",
"len",
"(",
"f",
".",
"Data",
")",
")",
";"... |
787 | all-788 | [
"HasClientEmail",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"i",
"*",
"IntegrationGCPDeleteRequest",
")",
"HasClientEmail",
"(",
")",
"bool",
"{",
"if",
"i",
"!=",
"nil",
"&&",
"i",
".",
"ClientEmail",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"<mask>",
"\n",
"}"
] |
788 | all-789 | [
"GetTypeOk",
"returns",
"a",
"tuple",
"with",
"the",
"Type",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"a",
"*",
"AlertGraphDefinition",
")",
"GetTypeOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"a",
"==",
"nil",
"||",
"a",
".",
"Type",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"return",
"*",... |
789 | all-790 | [
"cephRBDSnapshotProtect",
"protects",
"a",
"given",
"snapshot",
"from",
"being",
"deleted",
"This",
"is",
"a",
"precondition",
"to",
"be",
"able",
"to",
"create",
"RBD",
"clones",
"from",
"a",
"given",
"snapshot",
"."
] | [
"func",
"cephRBDSnapshotProtect",
"(",
"clusterName",
"string",
",",
"poolName",
"string",
",",
"volumeName",
"string",
",",
"volumeType",
"string",
",",
"snapshotName",
"string",
",",
"userName",
"string",
")",
"error",
"{",
"_",
",",
"err",
":=",
"shared",
"... |
790 | all-791 | [
"notify",
"function",
"accepts",
"an",
"event",
"and",
"notify",
"to",
"the",
"watchers",
"."
] | [
"func",
"(",
"wh",
"*",
"watcherHub",
")",
"notify",
"(",
"e",
"*",
"Event",
")",
"{",
"e",
"=",
"wh",
".",
"EventHistory",
".",
"addEvent",
"(",
"e",
")",
"// add event into the eventHistory",
"\n\n",
"segments",
":=",
"strings",
".",
"Split",
"(",
"e",... |
791 | all-792 | [
"Embed",
"svg",
"font",
"definition",
"to",
"svg",
"tree",
"itself",
"Or",
"update",
"existing",
"if",
"already",
"exists",
"for",
"curent",
"font",
"data"
] | [
"func",
"(",
"gc",
"*",
"GraphicContext",
")",
"embedSvgFont",
"(",
"text",
"string",
")",
"*",
"Font",
"{",
"fontName",
":=",
"gc",
".",
"Current",
".",
"FontData",
".",
"Name",
"\n",
"gc",
".",
"loadCurrentFont",
"(",
")",
"\n\n",
"// find or create font... |
792 | all-793 | [
"GetLayout",
"returns",
"the",
"Layout",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"b",
"*",
"BoardWidget",
")",
"GetLayout",
"(",
")",
"WidgetLayout",
"{",
"if",
"b",
"==",
"nil",
"||",
"b",
".",
"Layout",
"==",
"nil",
"{",
"return",
"WidgetLayout",
"{",
"}",
"\n",
"}",
"\n",
"<mask>",
"*",
"b",
".",
"Layout",
"\n",... |
793 | all-794 | [
"GetNameOk",
"returns",
"a",
"tuple",
"with",
"the",
"Name",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"g",
"*",
"GroupData",
")",
"GetNameOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"g",
"==",
"nil",
"||",
"g",
".",
"Name",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"return",
"*",
"g",
"... |
794 | all-795 | [
"WithContext",
"adds",
"the",
"context",
"to",
"the",
"update",
"Vm",
"with",
"state",
"params"
] | [
"func",
"(",
"o",
"*",
"UpdateVMWithStateParams",
")",
"WithContext",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"*",
"UpdateVMWithStateParams",
"{",
"o",
".",
"SetContext",
"(",
"ctx",
")",
"\n",
"return",
"o",
"\n",
"}"
] |
795 | all-796 | [
"HasModifiedAt",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"s",
"*",
"SyntheticsTest",
")",
"HasModifiedAt",
"(",
")",
"bool",
"{",
"if",
"s",
"!=",
"nil",
"&&",
"s",
".",
"ModifiedAt",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"<mask>",
"\n",
"}"
] |
796 | all-797 | [
"GetLastResolvedTs",
"returns",
"the",
"LastResolvedTs",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"g",
"*",
"GroupData",
")",
"GetLastResolvedTs",
"(",
")",
"int",
"{",
"if",
"g",
"==",
"nil",
"||",
"g",
".",
"LastResolvedTs",
"==",
"nil",
"{",
"<mask>",
"0",
"\n",
"}",
"\n",
"return",
"*",
"g",
".",
"LastResolvedTs",
"\n",
"}"
] |
797 | all-798 | [
"Convert",
"param",
"string",
"like",
"param1",
"=",
"value1",
";",
"param2",
"=",
"value2",
"to",
"mesos",
".",
"Labels"
] | [
"func",
"StringToLabels",
"(",
"s",
"string",
")",
"*",
"mesos",
".",
"Labels",
"{",
"labels",
":=",
"&",
"mesos",
".",
"Labels",
"{",
"Labels",
":",
"make",
"(",
"[",
"]",
"*",
"mesos",
".",
"Label",
",",
"0",
")",
"}",
"\n",
"if",
"s",
"==",
... |
798 | all-799 | [
"Log",
"implements",
"the",
"Backend",
"interface",
"."
] | [
"func",
"(",
"b",
"*",
"LogBackend",
")",
"Log",
"(",
"level",
"Level",
",",
"calldepth",
"int",
",",
"rec",
"*",
"Record",
")",
"error",
"{",
"if",
"b",
".",
"Color",
"{",
"col",
":=",
"colors",
"[",
"level",
"]",
"\n",
"if",
"len",
"(",
"b",
... |
799 | all-800 | [
"Returns",
"an",
"slice",
"of",
"ints",
"or",
"the",
"specified",
"slice",
"if",
"the",
"key",
"doesn",
"t",
"exist",
"or",
"isn",
"t",
"a",
"valid",
"[]",
"int",
".",
"Some",
"conversion",
"is",
"done",
"to",
"handle",
"the",
"fact",
"that",
"JSON",
... | [
"func",
"(",
"t",
"Typed",
")",
"Ints64Or",
"(",
"key",
"string",
",",
"d",
"[",
"]",
"int64",
")",
"[",
"]",
"int64",
"{",
"n",
",",
"<mask>",
":=",
"t",
".",
"Ints64If",
"(",
"key",
")",
"\n",
"if",
"ok",
"{",
"return",
"n",
"\n",
"}",
"\n"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.