id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
7,400 | all-7401 | [
"HashDatum15",
"computes",
"and",
"returns",
"the",
"hash",
"of",
"datum",
"+",
"pipeline",
"for",
"version",
"<",
"=",
"1",
".",
"5",
".",
"0",
"with",
"a",
"pipeline",
"-",
"specific",
"prefix",
"."
] | [
"func",
"HashDatum15",
"(",
"pipelineInfo",
"*",
"pps",
".",
"PipelineInfo",
",",
"data",
"[",
"]",
"*",
"Input",
")",
"(",
"string",
",",
"error",
")",
"{",
"hash",
":=",
"sha256",
".",
"New",
"(",
")",
"\n",
"for",
"_",
",",
"datum",
":=",
"range... |
7,401 | all-7402 | [
"NewReaderEncrypted",
"opens",
"a",
"file",
"for",
"reading",
"using",
"the",
"data",
"in",
"f",
"with",
"the",
"given",
"total",
"size",
".",
"If",
"the",
"PDF",
"is",
"encrypted",
"NewReaderEncrypted",
"calls",
"pw",
"repeatedly",
"to",
"obtain",
"passwords"... | [
"func",
"NewReaderEncrypted",
"(",
"f",
"io",
".",
"ReaderAt",
",",
"size",
"int64",
",",
"pw",
"func",
"(",
")",
"string",
")",
"(",
"*",
"Reader",
",",
"error",
")",
"{",
"buf",
":=",
"make",
"(",
"[",
"]",
"byte",
",",
"10",
")",
"\n",
"f",
... |
7,402 | all-7403 | [
"converts",
"domain",
"names",
"to",
"FQDN"
] | [
"func",
"canonicalizeDomainNames",
"(",
"domains",
"[",
"]",
"string",
")",
"[",
"]",
"string",
"{",
"var",
"cDomains",
"[",
"]",
"string",
"\n",
"for",
"_",
",",
"d",
":=",
"<mask>",
"domains",
"{",
"if",
"!",
"strings",
".",
"HasSuffix",
"(",
"d",
... |
7,403 | all-7404 | [
"PipelineRcName",
"generates",
"the",
"name",
"of",
"the",
"k8s",
"replication",
"controller",
"that",
"manages",
"a",
"pipeline",
"s",
"workers"
] | [
"func",
"PipelineRcName",
"(",
"name",
"string",
",",
"version",
"uint64",
")",
"string",
"{",
"// k8s won't allow RC names that contain upper-case letters",
"// or underscores",
"// TODO: deal with name collision",
"name",
"=",
"strings",
".",
"Replace",
"(",
"name",
",",
... |
7,404 | all-7405 | [
"RunStdin",
"runs",
"the",
"command",
"with",
"the",
"given",
"stdin",
"and",
"arguments",
"."
] | [
"func",
"RunStdin",
"(",
"stdin",
"<mask>",
".",
"Reader",
",",
"args",
"...",
"string",
")",
"error",
"{",
"return",
"RunIO",
"(",
"IO",
"{",
"Stdin",
":",
"stdin",
"}",
",",
"args",
"...",
")",
"\n",
"}"
] |
7,405 | all-7406 | [
"UnmarshalText",
"implements",
"encoding",
".",
"TextUnmarshaler",
"."
] | [
"func",
"(",
"uuid",
"*",
"UUID",
")",
"UnmarshalText",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"<mask>",
",",
"err",
":=",
"ParseBytes",
"(",
"data",
")",
"\n",
"if",
"err",
"==",
"nil",
"{",
"*",
"uuid",
"=",
"id",
"\n",
"}",
"\n",
... |
7,406 | all-7407 | [
"pluckParams",
"converts",
"a",
"pact",
"tag",
"into",
"a",
"pactParams",
"struct",
"Supported",
"Tag",
"Formats",
"Minimum",
"Slice",
"Size",
":",
"pact",
":",
"min",
"=",
"2",
"String",
"RegEx",
":",
"pact",
":",
"example",
"=",
"2000",
"-",
"01",
"-",... | [
"func",
"pluckParams",
"(",
"srcType",
"reflect",
".",
"Type",
",",
"pactTag",
"string",
")",
"params",
"{",
"params",
":=",
"getDefaults",
"(",
")",
"\n",
"if",
"pactTag",
"==",
"\"",
"\"",
"{",
"return",
"params",
"\n",
"}",
"\n\n",
"switch",
"kind",
... |
7,407 | all-7408 | [
"CalcClipper",
"calculates",
"the",
"clipper",
"size",
"based",
"on",
"the",
"control",
"s",
"size",
"position",
"and",
"paddings"
] | [
"func",
"CalcClipper",
"(",
"c",
"<mask>",
")",
"(",
"int",
",",
"int",
",",
"int",
",",
"int",
")",
"{",
"w",
",",
"h",
":=",
"c",
".",
"Size",
"(",
")",
"\n",
"x",
",",
"y",
":=",
"c",
".",
"Pos",
"(",
")",
"\n",
"px",
",",
"py",
":=",
... |
7,408 | all-7409 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"HighlightConfig",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"<mask>",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay13",
"(",
"&",
"... |
7,409 | all-7410 | [
"resourceVSphereDatastoreClusterFlattenSDRSData",
"saves",
"the",
"DRS",
"attributes",
"from",
"a",
"StoragePod",
"into",
"the",
"supplied",
"ResourceData",
".",
"Note",
"that",
"other",
"functions",
"handle",
"non",
"-",
"SDRS",
"related",
"items",
"such",
"as",
"p... | [
"func",
"resourceVSphereDatastoreClusterFlattenSDRSData",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"meta",
"interface",
"{",
"}",
",",
"pod",
"*",
"<mask>",
".",
"StoragePod",
")",
"error",
"{",
"log",
".",
"Printf",
"(",
"\"",
"\"",
",",
"resource... |
7,410 | all-7411 | [
"Warnm",
"is",
"a",
"short",
"-",
"hand",
"version",
"of",
"Warningm"
] | [
"func",
"(",
"b",
"*",
"Base",
")",
"Warnm",
"(",
"m",
"*",
"Attrs",
",",
"msg",
"string",
",",
"a",
"...",
"<mask>",
"{",
"}",
")",
"error",
"{",
"return",
"b",
".",
"Warningm",
"(",
"m",
",",
"msg",
",",
"a",
"...",
")",
"\n",
"}"
] |
7,411 | all-7412 | [
"Specify",
"the",
"value",
"of",
"a",
"uniform",
"variable",
"for",
"a",
"specified",
"program",
"object"
] | [
"func",
"ProgramUniform4i",
"(",
"program",
"uint32",
",",
"<mask>",
"int32",
",",
"v0",
"int32",
",",
"v1",
"int32",
",",
"v2",
"int32",
",",
"v3",
"int32",
")",
"{",
"C",
".",
"glowProgramUniform4i",
"(",
"gpProgramUniform4i",
",",
"(",
"C",
".",
"GLui... |
7,412 | all-7413 | [
"EmulateTouchFromMouseEvent",
"emulates",
"touch",
"event",
"from",
"the",
"mouse",
"event",
"parameters",
".",
"See",
":",
"https",
":",
"//",
"chromedevtools",
".",
"github",
".",
"io",
"/",
"devtools",
"-",
"protocol",
"/",
"tot",
"/",
"Input#method",
"-",
... | [
"func",
"EmulateTouchFromMouseEvent",
"(",
"typeVal",
"MouseType",
",",
"x",
"int64",
",",
"y",
"int64",
",",
"<mask>",
"ButtonType",
")",
"*",
"EmulateTouchFromMouseEventParams",
"{",
"return",
"&",
"EmulateTouchFromMouseEventParams",
"{",
"Type",
":",
"typeVal",
"... |
7,413 | all-7414 | [
"GetPixels",
"is",
"a",
"wrapper",
"around",
"gdk_pixbuf_get_pixels_with_length",
"()",
".",
"A",
"Go",
"slice",
"is",
"used",
"to",
"represent",
"the",
"underlying",
"Pixbuf",
"data",
"array",
"one",
"byte",
"per",
"channel",
"."
] | [
"func",
"(",
"v",
"*",
"Pixbuf",
")",
"GetPixels",
"(",
")",
"(",
"channels",
"[",
"]",
"byte",
")",
"{",
"var",
"length",
"C",
".",
"guint",
"\n",
"c",
":=",
"C",
".",
"gdk_pixbuf_get_pixels_with_length",
"(",
"v",
".",
"native",
"(",
")",
",",
"&... |
7,414 | all-7415 | [
"ToInfo",
"returns",
"the",
"service",
"instance",
"as",
"a",
"struct",
"compatible",
"with",
"the",
"return",
"of",
"the",
"service",
"info",
"api",
"call",
"."
] | [
"func",
"(",
"si",
"*",
"ServiceInstance",
")",
"ToInfo",
"(",
")",
"(",
"ServiceInstanceWithInfo",
",",
"error",
")",
"{",
"info",
",",
"err",
":=",
"si",
".",
"Info",
"(",
"\"",
"\"",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"info",
"=",
"nil",
... |
7,415 | all-7416 | [
"IsExist",
"returns",
"whether",
"the",
"error",
"is",
"known",
"to",
"report",
"that",
"an",
"user",
"or",
"group",
"already",
"exists",
".",
"It",
"is",
"satisfied",
"by",
"ErrUserExist",
"and",
"ErrGroupExist",
"."
] | [
"func",
"IsExist",
"(",
"err",
"error",
")",
"bool",
"{",
"if",
"err",
"==",
"ErrUserExist",
"||",
"err",
"==",
"ErrGroupExist",
"{",
"return",
"<mask>",
"\n",
"}",
"\n",
"return",
"false",
"\n",
"}"
] |
7,416 | all-7417 | [
"HTTPHandler",
"returns",
"an",
"HTTP",
"handler",
"for",
"a",
"REST",
"API",
"gateway",
"to",
"the",
"given",
"grpc",
"address",
"."
] | [
"func",
"(",
"api",
"*",
"API",
")",
"HTTPHandler",
"(",
"ctx",
"context",
".",
"Context",
",",
"grpcAddr",
"string",
")",
"(",
"<mask>",
".",
"Handler",
",",
"error",
")",
"{",
"enc",
":=",
"new",
"(",
"protoutil",
".",
"JSONPb",
")",
"\n",
"mux",
... |
7,417 | all-7418 | [
"GetId",
"returns",
"the",
"Id",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"d",
"*",
"DashboardList",
")",
"GetId",
"(",
")",
"int",
"{",
"if",
"d",
"==",
"nil",
"||",
"d",
".",
"Id",
"==",
"nil",
"{",
"return",
"0",
"\n",
"}",
"\n",
"return",
"*",
"d",
".",
"<mask>",
"\n",
"}"
] |
7,418 | all-7419 | [
"MiddlewareFunc",
"makes",
"StatusMiddleware",
"implement",
"the",
"Middleware",
"interface",
"."
] | [
"func",
"(",
"mw",
"*",
"StatusMiddleware",
")",
"MiddlewareFunc",
"(",
"h",
"HandlerFunc",
")",
"HandlerFunc",
"{",
"mw",
".",
"start",
"=",
"time",
".",
"Now",
"(",
")",
"\n",
"mw",
".",
"pid",
"=",
"os",
".",
"Getpid",
"(",
")",
"\n",
"mw",
".",... |
7,419 | all-7420 | [
"RequestCachedResponse",
"fetches",
"cache",
"entry",
".",
"See",
":",
"https",
":",
"//",
"chromedevtools",
".",
"github",
".",
"io",
"/",
"devtools",
"-",
"protocol",
"/",
"tot",
"/",
"CacheStorage#method",
"-",
"requestCachedResponse",
"parameters",
":",
"cac... | [
"func",
"RequestCachedResponse",
"(",
"cacheID",
"CacheID",
",",
"requestURL",
"string",
",",
"requestHeaders",
"[",
"]",
"*",
"<mask>",
")",
"*",
"RequestCachedResponseParams",
"{",
"return",
"&",
"RequestCachedResponseParams",
"{",
"CacheID",
":",
"cacheID",
",",
... |
7,420 | all-7421 | [
"applyVirtualDevices",
"is",
"used",
"by",
"Create",
"and",
"Update",
"to",
"build",
"a",
"list",
"of",
"virtual",
"device",
"changes",
"."
] | [
"func",
"applyVirtualDevices",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"c",
"*",
"govmomi",
".",
"Client",
",",
"l",
"object",
".",
"VirtualDeviceList",
")",
"(",
"[",
"]",
"types",
".",
"BaseVirtualDeviceConfigSpec",
",",
"error",
")",
"{",
"//... |
7,421 | all-7422 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"MediaQueryExpression",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss29",
"(",
"&",
"w",
",",
"v",
")",... |
7,422 | all-7423 | [
"Create",
"the",
"default",
"profile",
"of",
"a",
"project",
"."
] | [
"func",
"projectCreateDefaultProfile",
"(",
"tx",
"*",
"db",
".",
"ClusterTx",
",",
"project",
"string",
")",
"error",
"{",
"// Create a default profile",
"profile",
":=",
"db",
".",
"Profile",
"{",
"}",
"\n",
"profile",
".",
"Project",
"=",
"project",
"\n",
... |
7,423 | all-7424 | [
"Value",
"converts",
"Date",
"to",
"a",
"primitive",
"value",
"ready",
"to",
"written",
"to",
"a",
"database",
"."
] | [
"func",
"(",
"d",
"Date",
")",
"Value",
"(",
")",
"(",
"driver",
".",
"<mask>",
",",
"error",
")",
"{",
"return",
"driver",
".",
"Value",
"(",
"d",
".",
"String",
"(",
")",
")",
",",
"nil",
"\n",
"}"
] |
7,424 | all-7425 | [
"GetColorOk",
"returns",
"a",
"tuple",
"with",
"the",
"Color",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"c",
"*",
"ConditionalFormat",
")",
"GetColorOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"c",
"==",
"nil",
"||",
"c",
".",
"Color",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"return",
"*",
... |
7,425 | all-7426 | [
"Fill",
"copies",
"a",
"glyph",
"from",
"the",
"cache",
"and",
"fills",
"it"
] | [
"func",
"(",
"g",
"*",
"Glyph",
")",
"Fill",
"(",
"gc",
"draw2d",
".",
"GraphicContext",
",",
"x",
",",
"y",
"float64",
")",
"float64",
"{",
"gc",
".",
"Save",
"(",
")",
"\n",
"gc",
".",
"BeginPath",
"(",
")",
"\n",
"gc",
".",
"Translate",
"(",
... |
7,426 | all-7427 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"GetSamplingProfileParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler10",
"(",
"&",
"w",
",",
... |
7,427 | all-7428 | [
"Get",
"retrieves",
"the",
"environment",
"variable",
"key"
] | [
"func",
"(",
"e",
"EnvVar",
")",
"Get",
"(",
"<mask>",
"string",
")",
"string",
"{",
"for",
"_",
",",
"v",
":=",
"range",
"e",
"{",
"env",
":=",
"strings",
".",
"SplitN",
"(",
"v",
",",
"\"",
"\"",
",",
"2",
")",
"\n",
"if",
"len",
"(",
"env"... |
7,428 | all-7429 | [
"zfsToolVersionGet",
"returns",
"the",
"ZFS",
"tools",
"version"
] | [
"func",
"zfsToolVersionGet",
"(",
")",
"(",
"string",
",",
"error",
")",
"{",
"// This function is only really ever relevant on Ubuntu as the only",
"// distro that ships out of sync tools and kernel modules",
"out",
",",
"err",
":=",
"<mask>",
".",
"RunCommand",
"(",
"\"",
... |
7,429 | all-7430 | [
"UpdateCheckBundle",
"updates",
"passed",
"check",
"bundle",
"."
] | [
"func",
"(",
"a",
"*",
"API",
")",
"UpdateCheckBundle",
"(",
"cfg",
"*",
"CheckBundle",
")",
"(",
"*",
"CheckBundle",
",",
"error",
")",
"{",
"if",
"cfg",
"==",
"nil",
"{",
"return",
"nil",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
")",
"\n",
"... |
7,430 | all-7431 | [
"BackwardVisibleCursorPositions",
"is",
"a",
"wrapper",
"around",
"gtk_text_iter_backward_visible_cursor_positions",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"TextIter",
")",
"BackwardVisibleCursorPositions",
"(",
"v1",
"int",
")",
"bool",
"{",
"<mask>",
"gobool",
"(",
"C",
".",
"gtk_text_iter_backward_visible_cursor_positions",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"gint",
"(",... |
7,431 | all-7432 | [
"ParseText",
"parse",
"text",
"protocol",
"Point",
"host",
".",
"Point",
".",
"value",
"42",
"1422641531",
"\\",
"n"
] | [
"func",
"ParseText",
"(",
"line",
"string",
")",
"(",
"*",
"Points",
",",
"error",
")",
"{",
"row",
":=",
"strings",
".",
"Split",
"(",
"strings",
".",
"Trim",
"(",
"line",
",",
"\"",
"\\n",
"\\t",
"\\r",
"\"",
")",
",",
"\"",
"\"",
")",
"\n",
... |
7,432 | all-7433 | [
"ValidateConfig",
"is",
"used",
"to",
"validate",
"a",
"sane",
"configuration"
] | [
"func",
"ValidateConfig",
"(",
"config",
"*",
"Config",
")",
"error",
"{",
"// We don't actually support running as 0 in the library any more, but",
"// we do understand it.",
"protocolMin",
":=",
"ProtocolVersionMin",
"\n",
"if",
"protocolMin",
"==",
"0",
"{",
"protocolMin",... |
7,433 | all-7434 | [
"ResetBody",
"resets",
"response",
"body",
"."
] | [
"func",
"(",
"resp",
"*",
"Response",
")",
"ResetBody",
"(",
")",
"{",
"resp",
".",
"bodyRaw",
"=",
"nil",
"\n",
"resp",
".",
"closeBodyStream",
"(",
")",
"\n",
"if",
"resp",
".",
"body",
"!=",
"nil",
"{",
"if",
"resp",
".",
"keepBodyBuffer",
"{",
... |
7,434 | all-7435 | [
"StoragePoolConfigClear",
"deletes",
"the",
"storage",
"pool",
"config",
"."
] | [
"func",
"StoragePoolConfigClear",
"(",
"<mask>",
"*",
"sql",
".",
"Tx",
",",
"poolID",
",",
"nodeID",
"int64",
")",
"error",
"{",
"_",
",",
"err",
":=",
"tx",
".",
"Exec",
"(",
"\"",
"\"",
",",
"poolID",
",",
"nodeID",
")",
"\n",
"if",
"err",
"!=",... |
7,435 | all-7436 | [
"delegatedGTLDs",
"filters",
"the",
"provided",
"list",
"of",
"GTLDPeriods",
"removing",
"any",
"entries",
"that",
"were",
"never",
"delegated",
"from",
"the",
"root",
"DNS",
"."
] | [
"func",
"delegatedGTLDs",
"(",
"entries",
"[",
"]",
"util",
".",
"GTLDPeriod",
")",
"[",
"]",
"util",
".",
"GTLDPeriod",
"{",
"var",
"results",
"[",
"]",
"util",
".",
"GTLDPeriod",
"\n",
"for",
"_",
",",
"gTLD",
":=",
"range",
"entries",
"{",
"if",
"... |
7,436 | all-7437 | [
"GetSize",
"returns",
"the",
"dimensions",
"of",
"the",
"given",
"terminal",
"."
] | [
"func",
"GetSize",
"(",
"fd",
"int",
")",
"(",
"width",
",",
"height",
"int",
",",
"err",
"error",
")",
"{",
"ws",
",",
"err",
":=",
"unix",
".",
"IoctlGetWinsize",
"(",
"fd",
",",
"unix",
".",
"TIOCGWINSZ",
")",
"\n",
"if",
"err",
"!=",
"nil",
"... |
7,437 | all-7438 | [
"nthLast",
"returns",
"the",
"nth",
"most",
"recent",
"element",
"added",
"to",
"the",
"ring",
"."
] | [
"func",
"(",
"r",
"*",
"sampleRing",
")",
"nthLast",
"(",
"n",
"int",
")",
"(",
"int64",
",",
"float64",
",",
"bool",
")",
"{",
"if",
"n",
">",
"r",
".",
"l",
"{",
"return",
"0",
",",
"0",
",",
"false",
"\n",
"}",
"\n",
"t",
",",
"v",
":=",... |
7,438 | all-7439 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"GetApplicationCacheForFrameReturns",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache5",
"(",
"&",
... |
7,439 | all-7440 | [
"retrieve",
"the",
"label",
"of",
"a",
"named",
"object",
"identified",
"within",
"a",
"namespace"
] | [
"func",
"GetObjectLabel",
"(",
"identifier",
"uint32",
",",
"name",
"uint32",
",",
"bufSize",
"int32",
",",
"<mask>",
"*",
"int32",
",",
"label",
"*",
"uint8",
")",
"{",
"C",
".",
"glowGetObjectLabel",
"(",
"gpGetObjectLabel",
",",
"(",
"C",
".",
"GLenum",... |
7,440 | all-7441 | [
"Instance",
"implements",
"gin",
"s",
"HTML",
"render",
"interface"
] | [
"func",
"(",
"r",
"*",
"Render",
")",
"Instance",
"(",
"name",
"string",
",",
"data",
"interface",
"{",
"}",
")",
"render",
".",
"Render",
"{",
"var",
"tpl",
"*",
"template",
".",
"<mask>",
"\n\n",
"// Check if gin is running in debug mode and load the templates... |
7,441 | all-7442 | [
"Errorf",
"outputs",
"formatted",
"Error",
"log"
] | [
"func",
"Errorf",
"(",
"format",
"string",
",",
"val",
"...",
"interface",
"{",
"}",
")",
"error",
"{",
"return",
"glg",
".",
"<mask>",
"(",
"ERR",
",",
"format",
",",
"val",
"...",
")",
"\n",
"}"
] |
7,442 | all-7443 | [
"PutResourcePolicy",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockSecretsManagerAPI",
")",
"PutResourcePolicy",
"(",
"arg0",
"*",
"secretsmanager",
".",
"PutResourcePolicyInput",
")",
"(",
"*",
"secretsmanager",
".",
"PutResourcePolicyOutput",
",",
"error",
")",
"{",
"ret",
":=",
"m",
".",
"ctrl",
... |
7,443 | all-7444 | [
"Write",
"the",
"body",
"of",
"the",
"response"
] | [
"func",
"(",
"w",
"*",
"Response",
")",
"Write",
"(",
"b",
"[",
"]",
"<mask>",
")",
"(",
"int",
",",
"error",
")",
"{",
"w",
".",
"Size",
"=",
"binary",
".",
"Size",
"(",
"b",
")",
"\n",
"return",
"w",
".",
"ResponseWriter",
".",
"Write",
"(",
... |
7,444 | all-7445 | [
"HasHandle",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"u",
"*",
"User",
")",
"HasHandle",
"(",
")",
"bool",
"{",
"if",
"u",
"!=",
"nil",
"&&",
"u",
".",
"Handle",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
7,445 | all-7446 | [
"ClientWithTimeout",
"is",
"an",
"http",
"client",
"optimized",
"for",
"high",
"throughput",
"to",
"S3",
"It",
"times",
"out",
"more",
"agressively",
"than",
"the",
"default",
"http",
"client",
"in",
"net",
"/",
"http",
"as",
"well",
"as",
"setting",
"deadli... | [
"func",
"ClientWithTimeout",
"(",
"timeout",
"time",
".",
"Duration",
")",
"*",
"http",
".",
"Client",
"{",
"transport",
":=",
"&",
"http",
".",
"Transport",
"{",
"Proxy",
":",
"http",
".",
"ProxyFromEnvironment",
",",
"Dial",
":",
"func",
"(",
"netw",
"... |
7,446 | all-7447 | [
"buildAndSelectGuestIPs",
"builds",
"a",
"list",
"of",
"IP",
"addresses",
"known",
"to",
"VMware",
"tools",
"skipping",
"local",
"and",
"auto",
"-",
"configuration",
"addresses",
".",
"The",
"builder",
"is",
"non",
"-",
"discriminate",
"and",
"is",
"only",
"de... | [
"func",
"buildAndSelectGuestIPs",
"(",
"ctx",
"context",
".",
"Context",
",",
"vm",
"*",
"object",
".",
"VirtualMachine",
")",
"(",
"[",
"]",
"string",
",",
"error",
")",
"{",
"logger",
".",
"Printf",
"(",
"\"",
"\"",
",",
"vm",
".",
"Name",
"(",
")"... |
7,447 | all-7448 | [
"ResolveWithGoPath",
"will",
"resolve",
"the",
"filename",
"relative",
"to",
"GOPATH",
"and",
"returns",
"the",
"first",
"file",
"that",
"exists",
"or",
"an",
"error",
"otherwise",
"."
] | [
"func",
"ResolveWithGoPath",
"(",
"<mask>",
"string",
")",
"(",
"string",
",",
"error",
")",
"{",
"for",
"_",
",",
"file",
":=",
"range",
"goPathCandidates",
"(",
"filename",
")",
"{",
"if",
"_",
",",
"err",
":=",
"os",
".",
"Stat",
"(",
"file",
")",... |
7,448 | all-7449 | [
"NewWeightedReport",
"returns",
"a",
"report",
"that",
"includes",
"both",
"weighted",
"and",
"unweighted",
"statistics",
"."
] | [
"func",
"NewWeightedReport",
"(",
"r",
"Report",
",",
"precision",
"string",
")",
"Report",
"{",
"return",
"&",
"weightedReport",
"{",
"baseReport",
":",
"r",
",",
"<mask>",
":",
"newReport",
"(",
"precision",
")",
",",
"results",
":",
"make",
"(",
"chan",... |
7,449 | all-7450 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"SetAdBlockingEnabledParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage14",
"(",
"&",
"w",
",",
"v",... |
7,450 | all-7451 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"GetBestEffortCoverageParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler20",
"(",
"&",
"w",
",",
... |
7,451 | all-7452 | [
"GetRegionalLocations",
"returns",
"a",
"list",
"of",
"available",
"locations",
"in",
"a",
"specific",
"region"
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"GetRegionalLocations",
"(",
"regid",
"string",
")",
"(",
"*",
"Locations",
",",
"error",
")",
"{",
"url",
":=",
"locationRegPath",
"(",
"regid",
")",
"+",
"c",
".",
"client",
".",
"<mask>",
"+",
"`&pretty=`",
"+",... |
7,452 | all-7453 | [
"GetTitleOk",
"returns",
"a",
"tuple",
"with",
"the",
"Title",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"c",
"*",
"CheckStatusDefinition",
")",
"GetTitleOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"c",
"==",
"nil",
"||",
"c",
".",
"Title",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"return",
"... |
7,453 | all-7454 | [
"Do",
"executes",
"Network",
".",
"clearBrowserCookies",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"ClearBrowserCookiesParams",
")",
"Do",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandClearBrowserCookies",
",",
"nil",
",",
"nil",
")",
"\n",
... |
7,454 | all-7455 | [
"BasicAuthDSN",
"return",
"the",
"connector",
"DSN",
"for",
"basic",
"authentication",
"."
] | [
"func",
"(",
"c",
"*",
"Connector",
")",
"BasicAuthDSN",
"(",
")",
"string",
"{",
"values",
":=",
"url",
".",
"Values",
"{",
"}",
"\n",
"if",
"c",
".",
"locale",
"!=",
"\"",
"\"",
"{",
"values",
".",
"Set",
"(",
"DSNLocale",
",",
"c",
".",
"local... |
7,455 | all-7456 | [
"MutateSetOptions",
"for",
"HomeDomain",
"sets",
"the",
"SetOptionsOp",
"s",
"HomeDomain",
"field"
] | [
"func",
"(",
"m",
"HomeDomain",
")",
"MutateSetOptions",
"(",
"o",
"*",
"xdr",
".",
"SetOptionsOp",
")",
"(",
"err",
"error",
")",
"{",
"if",
"len",
"(",
"m",
")",
">",
"32",
"{",
"return",
"<mask>",
".",
"New",
"(",
"\"",
"\"",
")",
"\n",
"}",
... |
7,456 | all-7457 | [
"Parse",
"parses",
"the",
"provided",
"as",
"a",
"stellar",
"amount",
"i",
".",
"e",
".",
"A",
"64",
"-",
"bit",
"signed",
"integer",
"that",
"represents",
"a",
"decimal",
"number",
"with",
"7",
"digits",
"of",
"significance",
"in",
"the",
"fractional",
... | [
"func",
"Parse",
"(",
"v",
"string",
")",
"(",
"xdr",
".",
"Int64",
",",
"error",
")",
"{",
"<mask>",
"f",
",",
"o",
",",
"r",
"big",
".",
"Rat",
"\n\n",
"_",
",",
"ok",
":=",
"f",
".",
"SetString",
"(",
"v",
")",
"\n",
"if",
"!",
"ok",
"{"... |
7,457 | all-7458 | [
"NewPgDump",
"-",
"a",
"pgdump",
"object",
"initialized",
"for",
"local",
"fs"
] | [
"func",
"NewPgDump",
"(",
"ip",
"string",
",",
"<mask>",
"int",
",",
"database",
",",
"username",
",",
"password",
"string",
")",
"*",
"PgDump",
"{",
"return",
"&",
"PgDump",
"{",
"IP",
":",
"ip",
",",
"Port",
":",
"port",
",",
"Database",
":",
"data... |
7,458 | all-7459 | [
"AddHandler",
"adds",
"a",
"function",
"to",
"be",
"called",
"whenever",
"an",
"event",
"is",
"received"
] | [
"func",
"(",
"op",
"*",
"operation",
")",
"AddHandler",
"(",
"function",
"func",
"(",
"api",
".",
"<mask>",
")",
")",
"(",
"*",
"EventTarget",
",",
"error",
")",
"{",
"// Make sure we have a listener setup",
"err",
":=",
"op",
".",
"setupListener",
"(",
")... |
7,459 | all-7460 | [
"MutateTransaction",
"for",
"MemoHash",
"sets",
"the",
"memo",
"."
] | [
"func",
"(",
"m",
"MemoHash",
")",
"MutateTransaction",
"(",
"o",
"*",
"TransactionBuilder",
")",
"(",
"err",
"error",
")",
"{",
"o",
".",
"TX",
".",
"Memo",
",",
"err",
"=",
"xdr",
".",
"NewMemo",
"(",
"xdr",
".",
"MemoTypeMemoHash",
",",
"m",
".",
... |
7,460 | all-7461 | [
"SetMarginLeft",
"is",
"a",
"wrapper",
"around",
"gtk_widget_set_margin_left",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Widget",
")",
"SetMarginLeft",
"(",
"<mask>",
"int",
")",
"{",
"C",
".",
"gtk_widget_set_margin_left",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"gint",
"(",
"margin",
")",
")",
"\n",
"}"
] |
7,461 | all-7462 | [
"FlagToEnv",
"converts",
"flag",
"string",
"to",
"upper",
"-",
"case",
"environment",
"variable",
"key",
"string",
"."
] | [
"func",
"FlagToEnv",
"(",
"prefix",
",",
"name",
"string",
")",
"string",
"{",
"return",
"<mask>",
"+",
"\"",
"\"",
"+",
"strings",
".",
"ToUpper",
"(",
"strings",
".",
"Replace",
"(",
"name",
",",
"\"",
"\"",
",",
"\"",
"\"",
",",
"-",
"1",
")",
... |
7,462 | all-7463 | [
"StoreParam",
"stores",
"a",
"variable",
"in",
"a",
"context"
] | [
"func",
"StoreParam",
"(",
"ctx",
"context",
".",
"Context",
",",
"name",
"string",
",",
"value",
"string",
")",
"context",
".",
"<mask>",
"{",
"n",
":=",
"paramName",
"(",
"name",
")",
"\n",
"return",
"context",
".",
"WithValue",
"(",
"ctx",
",",
"n",... |
7,463 | all-7464 | [
"Compact",
"compacts",
"member",
"storage",
"with",
"given",
"revision",
".",
"It",
"blocks",
"until",
"it",
"s",
"physically",
"done",
"."
] | [
"func",
"(",
"m",
"*",
"Member",
")",
"Compact",
"(",
"rev",
"int64",
",",
"timeout",
"time",
".",
"Duration",
")",
"error",
"{",
"cli",
",",
"err",
":=",
"m",
".",
"CreateEtcdClient",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"fmt",... |
7,464 | all-7465 | [
"UnmarshalJSON",
"is",
"a",
"Custom",
"Unmarshal",
"for",
"Yaxis",
".",
"Min",
"/",
"Yaxis",
".",
"Max",
".",
"If",
"the",
"datadog",
"API",
"returns",
"auto",
"for",
"min",
"or",
"max",
"then",
"we",
"should",
"set",
"Yaxis",
".",
"min",
"or",
"Yaxis"... | [
"func",
"(",
"y",
"*",
"Yaxis",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"type",
"Alias",
"Yaxis",
"\n",
"wrapper",
":=",
"&",
"struct",
"{",
"Min",
"*",
"json",
".",
"Number",
"`json:\"min,omitempty\"`",
"\n",
"Max",
"*"... |
7,465 | all-7466 | [
"LoadImage",
"invokes",
"loads",
"an",
"image",
"from",
"an",
"input",
"stream",
"with",
"a",
"specified",
"timeout"
] | [
"func",
"(",
"dg",
"*",
"dockerGoClient",
")",
"LoadImage",
"(",
"ctx",
"context",
".",
"Context",
",",
"inputStream",
"io",
".",
"Reader",
",",
"timeout",
"time",
".",
"Duration",
")",
"error",
"{",
"ctx",
",",
"cancel",
":=",
"context",
".",
"WithTimeo... |
7,466 | all-7467 | [
"ReceiveIssueEvent",
"calls",
"plugin",
".",
"ReceiveIssueEvent",
"()",
"if",
"the",
"author",
"is",
"not",
"filtered"
] | [
"func",
"(",
"a",
"*",
"AuthorFilterPluginWrapper",
")",
"ReceiveIssueEvent",
"(",
"event",
"sql",
".",
"IssueEvent",
")",
"[",
"]",
"Point",
"{",
"if",
"event",
".",
"Actor",
"!=",
"nil",
"&&",
"a",
".",
"match",
"(",
"*",
"<mask>",
".",
"Actor",
")",... |
7,467 | all-7468 | [
"OptImportRoaring",
"enables",
"importing",
"using",
"roaring",
"bitmaps",
"which",
"is",
"more",
"performant",
"."
] | [
"func",
"OptImportRoaring",
"(",
"enable",
"bool",
")",
"ImportOption",
"{",
"return",
"func",
"(",
"<mask>",
"*",
"ImportOptions",
")",
"error",
"{",
"options",
".",
"wantRoaring",
"=",
"&",
"enable",
"\n",
"return",
"nil",
"\n",
"}",
"\n",
"}"
] |
7,468 | all-7469 | [
"native",
"()",
"returns",
"a",
"pointer",
"to",
"the",
"underlying",
"GtkVolumeButton",
"."
] | [
"func",
"(",
"v",
"*",
"VolumeButton",
")",
"native",
"(",
")",
"*",
"C",
".",
"GtkVolumeButton",
"{",
"if",
"v",
"==",
"nil",
"||",
"v",
".",
"GObject",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"p",
":=",
"unsafe",
".",
"Pointer",
"("... |
7,469 | all-7470 | [
"makePlatformStringsExpr",
"constructs",
"a",
"single",
"expression",
"from",
"the",
"sub",
"-",
"expressions",
"in",
"ps",
"."
] | [
"func",
"makePlatformStringsExpr",
"(",
"ps",
"platformStringsExprs",
")",
"bzl",
".",
"Expr",
"{",
"makeSelect",
":=",
"func",
"(",
"dict",
"*",
"bzl",
".",
"DictExpr",
")",
"bzl",
".",
"Expr",
"{",
"return",
"&",
"bzl",
".",
"CallExpr",
"{",
"X",
":",
... |
7,470 | all-7471 | [
"Do",
"executes",
"DOM",
".",
"moveTo",
"against",
"the",
"provided",
"context",
".",
"returns",
":",
"nodeID",
"-",
"New",
"id",
"of",
"the",
"moved",
"node",
"."
] | [
"func",
"(",
"p",
"*",
"MoveToParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"nodeID",
"cdp",
".",
"NodeID",
",",
"err",
"error",
")",
"{",
"// execute",
"var",
"res",
"MoveToReturns",
"\n",
"err",
"=",
"cdp",
".",
"Execute",
"(... |
7,471 | all-7472 | [
"decodeContent",
"performs",
"transport",
"decoding",
"(",
"base64",
"quoted",
"-",
"printable",
")",
"and",
"charset",
"decoding",
"placing",
"the",
"result",
"into",
"Part",
".",
"Content",
".",
"IO",
"errors",
"will",
"be",
"returned",
"immediately",
";",
"... | [
"func",
"(",
"p",
"*",
"Part",
")",
"decodeContent",
"(",
"r",
"io",
".",
"Reader",
")",
"error",
"{",
"// contentReader will point to the end of the content decoding pipeline.",
"contentReader",
":=",
"r",
"\n",
"// b64cleaner aggregates errors, must maintain a reference to ... |
7,472 | all-7473 | [
"Fail",
"outputs",
"Failed",
"log"
] | [
"func",
"(",
"g",
"*",
"Glg",
")",
"Fail",
"(",
"val",
"...",
"<mask>",
"{",
"}",
")",
"error",
"{",
"return",
"g",
".",
"out",
"(",
"FAIL",
",",
"blankFormat",
"(",
"len",
"(",
"val",
")",
")",
",",
"val",
"...",
")",
"\n",
"}"
] |
7,473 | all-7474 | [
"FromYAML",
"allows",
"a",
"fixture",
"to",
"be",
"created",
"from",
"yaml",
"input"
] | [
"func",
"FromYAML",
"(",
"db",
"*",
"sql",
".",
"<mask>",
",",
"yamlIn",
"[",
"]",
"byte",
")",
"(",
"Fixture",
",",
"error",
")",
"{",
"var",
"tables",
"Tables",
"\n",
"err",
":=",
"yaml",
".",
"Unmarshal",
"(",
"yamlIn",
",",
"&",
"tables",
")",
... |
7,474 | all-7475 | [
"AppChooserWidgetNew",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_app_chooser_widget_new",
"()",
"."
] | [
"func",
"AppChooserWidgetNew",
"(",
"content_type",
"string",
")",
"(",
"*",
"AppChooserWidget",
",",
"error",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"content_type",
")",
"\n",
"defer",
"C",
".",
"<mask>",
"(",
"unsafe",
".",
"Pointer",
"(",
"... |
7,475 | all-7476 | [
"BlockPathFromEnv",
"gets",
"the",
"path",
"to",
"an",
"object",
"storage",
"block",
"based",
"on",
"environment",
"variables",
"."
] | [
"func",
"BlockPathFromEnv",
"(",
"block",
"*",
"pfs",
".",
"Block",
")",
"(",
"string",
",",
"error",
")",
"{",
"storageRoot",
",",
"err",
":=",
"StorageRootFromEnv",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"\"",
"\"",
",",
"err",
"\... |
7,476 | all-7477 | [
"newEphemeralGPGSigningMechanism",
"returns",
"a",
"new",
"GPG",
"/",
"OpenPGP",
"signing",
"mechanism",
"which",
"recognizes",
"_only_",
"public",
"keys",
"from",
"the",
"supplied",
"blob",
"and",
"returns",
"the",
"identities",
"of",
"these",
"keys",
".",
"The",... | [
"func",
"newEphemeralGPGSigningMechanism",
"(",
"blob",
"[",
"]",
"<mask>",
")",
"(",
"SigningMechanism",
",",
"[",
"]",
"string",
",",
"error",
")",
"{",
"m",
":=",
"&",
"openpgpSigningMechanism",
"{",
"keyring",
":",
"openpgp",
".",
"EntityList",
"{",
"}",... |
7,477 | all-7478 | [
"AddressList",
"returns",
"a",
"mail",
".",
"Address",
"slice",
"with",
"RFC",
"2047",
"encoded",
"names",
"converted",
"to",
"UTF",
"-",
"8"
] | [
"func",
"(",
"e",
"*",
"Envelope",
")",
"AddressList",
"(",
"key",
"string",
")",
"(",
"[",
"]",
"*",
"mail",
".",
"Address",
",",
"error",
")",
"{",
"if",
"e",
".",
"header",
"==",
"nil",
"{",
"return",
"nil",
",",
"fmt",
".",
"Errorf",
"(",
"... |
7,478 | all-7479 | [
"returns",
"next",
"sparse",
"array",
"node",
"(",
"or",
"NULL",
"if",
"there",
"is",
"no",
"more",
"nodes",
")"
] | [
"func",
"(",
"iter",
"*",
"SparseMatIterator",
")",
"Next",
"(",
")",
"*",
"SparseNode",
"{",
"node",
":=",
"C",
".",
"cvGetNextSparseNode",
"(",
"(",
"*",
"C",
".",
"CvSparseMatIterator",
")",
"(",
"iter",
")",
")",
"\n",
"return",
"(",
"*",
"SparseNo... |
7,479 | all-7480 | [
"define",
"an",
"array",
"of",
"secondary",
"colors"
] | [
"func",
"SecondaryColorPointer",
"(",
"size",
"int32",
",",
"xtype",
"uint32",
",",
"stride",
"int32",
",",
"pointer",
"unsafe",
".",
"Pointer",
")",
"{",
"C",
".",
"glowSecondaryColorPointer",
"(",
"gpSecondaryColorPointer",
",",
"(",
"C",
".",
"GLint",
")",
... |
7,480 | all-7481 | [
"SetBoolStringPtr",
"sets",
"a",
"stringified",
"ResoruceData",
"bool",
"field",
".",
"This",
"is",
"a",
"field",
"that",
"is",
"supposed",
"to",
"behave",
"like",
"a",
"bool",
"(",
"true",
"/",
"false",
")",
"but",
"needs",
"to",
"be",
"a",
"string",
"t... | [
"func",
"SetBoolStringPtr",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"key",
"string",
",",
"val",
"*",
"bool",
")",
"error",
"{",
"var",
"s",
"string",
"\n",
"if",
"val",
"!=",
"nil",
"{",
"s",
"=",
"strconv",
".",
"FormatBool",
"(",
"*",
... |
7,481 | all-7482 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"UsageForType",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage",
"(",
"&",
"w",
",",
"v",
")",
"\n... |
7,482 | all-7483 | [
"Add",
"adds",
"a",
"point",
"."
] | [
"func",
"(",
"countIndex",
"*",
"CountIndex",
")",
"Add",
"(",
"point",
"Point",
")",
"{",
"countIndex",
".",
"Remove",
"(",
"point",
".",
"<mask>",
"(",
")",
")",
"\n",
"countIndex",
".",
"currentPosition",
"[",
"point",
".",
"Id",
"(",
")",
"]",
"=... |
7,483 | all-7484 | [
"Join",
"returns",
"a",
"new",
"JoinCondition",
"of",
"JOIN",
"clause",
"."
] | [
"func",
"(",
"db",
"*",
"DB",
")",
"Join",
"(",
"table",
"<mask>",
"{",
"}",
")",
"*",
"JoinCondition",
"{",
"return",
"(",
"&",
"JoinCondition",
"{",
"db",
":",
"db",
"}",
")",
".",
"Join",
"(",
"table",
")",
"\n",
"}"
] |
7,484 | all-7485 | [
"expandClusterVMHostRuleInfo",
"reads",
"certain",
"ResourceData",
"keys",
"and",
"returns",
"a",
"ClusterVmHostRuleInfo",
"."
] | [
"func",
"expandClusterVMHostRuleInfo",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
")",
"(",
"*",
"<mask>",
".",
"ClusterVmHostRuleInfo",
",",
"error",
")",
"{",
"obj",
":=",
"&",
"types",
".",
"ClusterVmHostRuleInfo",
"{",
"ClusterRuleInfo",
":",
"types",
"... |
7,485 | all-7486 | [
"New",
"will",
"create",
"an",
"ActionBar",
"object"
] | [
"func",
"New",
"(",
"admin",
"*",
"admin",
".",
"Admin",
")",
"*",
"ActionBar",
"{",
"bar",
":=",
"&",
"ActionBar",
"{",
"Admin",
":",
"admin",
"}",
"\n",
"ctr",
":=",
"&",
"controller",
"{",
"ActionBar",
":",
"<mask>",
"}",
"\n",
"admin",
".",
"Ge... |
7,486 | all-7487 | [
"NewMinioClientFromEnv",
"creates",
"a",
"Minio",
"client",
"based",
"on",
"environment",
"variables",
"."
] | [
"func",
"NewMinioClientFromEnv",
"(",
")",
"(",
"Client",
",",
"error",
")",
"{",
"bucket",
",",
"ok",
":=",
"os",
".",
"LookupEnv",
"(",
"MinioBucketEnvVar",
")",
"\n",
"if",
"!",
"ok",
"{",
"return",
"nil",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"... |
7,487 | all-7488 | [
"Create",
"a",
"NestedError",
"with",
"the",
"given",
"path",
".",
"If",
"err",
"is",
"a",
"NestedError",
"prepend",
"the",
"path",
"to",
"it",
".",
"If",
"err",
"is",
"an",
"AggregateError",
"recursively",
"Nest",
"each",
"error",
"."
] | [
"func",
"Nest",
"(",
"path",
"string",
",",
"err",
"error",
")",
"error",
"{",
"if",
"ag",
",",
"ok",
":=",
"err",
".",
"(",
"AggregateError",
")",
";",
"ok",
"{",
"var",
"errs",
"AggregateError",
"\n",
"for",
"_",
",",
"e",
":=",
"range",
"ag",
... |
7,488 | all-7489 | [
"Font",
"returns",
"the",
"font",
"with",
"the",
"given",
"name",
"associated",
"with",
"the",
"page",
"."
] | [
"func",
"(",
"p",
"Page",
")",
"Font",
"(",
"name",
"string",
")",
"Font",
"{",
"return",
"Font",
"{",
"p",
".",
"Resources",
"(",
")",
".",
"Key",
"(",
"\"",
"\"",
")",
".",
"Key",
"(",
"<mask>",
")",
"}",
"\n",
"}"
] |
7,489 | all-7490 | [
"ErrMissingRequiredField",
"indicates",
"the",
"request",
"is",
"missing",
"a",
"required",
"field",
"."
] | [
"func",
"ErrMissingRequiredField",
"(",
"field",
"string",
")",
"error",
"{",
"return",
"ErrorResponse",
"{",
"Code",
":",
"http",
".",
"StatusBadRequest",
",",
"Message",
":",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"<mask>",
")",
",",
"}",
"\n",
"... |
7,490 | all-7491 | [
"NewRoundTripper",
"returns",
"a",
"roundTripper",
"used",
"to",
"send",
"requests",
"to",
"rafthttp",
"listener",
"of",
"remote",
"peers",
"."
] | [
"func",
"NewRoundTripper",
"(",
"tlsInfo",
"transport",
".",
"TLSInfo",
",",
"dialTimeout",
"time",
".",
"Duration",
")",
"(",
"<mask>",
".",
"RoundTripper",
",",
"error",
")",
"{",
"// It uses timeout transport to pair with remote timeout listeners.",
"// It sets no read... |
7,491 | all-7492 | [
"Do",
"executes",
"Page",
".",
"addCompilationCache",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"AddCompilationCacheParams",
")",
"Do",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandAddCompilationCache",
",",
"p",
",",
"nil",
")",
"\n",
"}... |
7,492 | all-7493 | [
"IsError",
"implements",
"the",
"driver",
".",
"Error",
"interface",
"."
] | [
"func",
"(",
"e",
"*",
"hdbErrors",
")",
"IsError",
"(",
")",
"bool",
"{",
"return",
"e",
".",
"<mask>",
"[",
"e",
".",
"idx",
"]",
".",
"errorLevel",
"==",
"errorLevelError",
"\n",
"}"
] |
7,493 | all-7494 | [
"title",
":",
"machine",
"list",
"path",
":",
"/",
"iaas",
"/",
"machines",
"method",
":",
"GET",
"produce",
":",
"application",
"/",
"json",
"responses",
":",
"200",
":",
"OK",
"401",
":",
"Unauthorized"
] | [
"func",
"machinesList",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"token",
"auth",
".",
"<mask>",
")",
"error",
"{",
"machines",
",",
"err",
":=",
"iaas",
".",
"ListMachines",
"(",
")",
"\n",
"if",
"err",
"!... |
7,494 | all-7495 | [
"NewMulti",
"creates",
"a",
"MultiLog"
] | [
"func",
"NewMulti",
"(",
"vals",
"...",
"interface",
"{",
"}",
")",
"LogBackend",
"{",
"if",
"len",
"(",
"vals",
")",
"%",
"2",
"!=",
"0",
"{",
"Fail",
"(",
"e",
".",
"New",
"(",
"\"",
"\"",
")",
")",
"\n",
"return",
"nil",
"\n",
"}",
"\n",
"... |
7,495 | all-7496 | [
"RemoteAddr",
"returns",
"client",
"address",
"for",
"the",
"given",
"request",
".",
"Always",
"returns",
"non",
"-",
"nil",
"result",
"."
] | [
"func",
"(",
"ctx",
"*",
"RequestCtx",
")",
"RemoteAddr",
"(",
")",
"<mask>",
".",
"Addr",
"{",
"if",
"ctx",
".",
"c",
"==",
"nil",
"{",
"return",
"zeroTCPAddr",
"\n",
"}",
"\n",
"addr",
":=",
"ctx",
".",
"c",
".",
"RemoteAddr",
"(",
")",
"\n",
"... |
7,496 | all-7497 | [
"A",
"word",
"is",
"called",
"short",
"if",
"it",
"ends",
"in",
"a",
"short",
"syllable",
"and",
"if",
"R1",
"is",
"null",
"."
] | [
"func",
"isShortWord",
"(",
"w",
"*",
"snowballword",
".",
"SnowballWord",
")",
"(",
"isShort",
"bool",
")",
"{",
"// If r1 is not empty, the word is not short",
"if",
"w",
".",
"R1start",
"<",
"len",
"(",
"w",
".",
"RS",
")",
"{",
"<mask>",
"\n",
"}",
"\n... |
7,497 | all-7498 | [
"See",
"bcd",
".",
"Tracer",
".",
"Finalize",
"()",
"."
] | [
"func",
"(",
"t",
"*",
"BTTracer",
")",
"Finalize",
"(",
"options",
"[",
"]",
"string",
")",
"*",
"exec",
".",
"Cmd",
"{",
"t",
".",
"m",
".",
"RLock",
"(",
")",
"\n",
"defer",
"t",
".",
"m",
".",
"RUnlock",
"(",
")",
"\n\n",
"tracer",
":=",
... |
7,498 | all-7499 | [
"ResetConnectionClose",
"clears",
"Connection",
":",
"close",
"header",
"if",
"it",
"exists",
"."
] | [
"func",
"(",
"h",
"*",
"RequestHeader",
")",
"ResetConnectionClose",
"(",
")",
"{",
"h",
".",
"parseRawHeaders",
"(",
")",
"\n",
"if",
"h",
".",
"connectionClose",
"{",
"h",
".",
"connectionClose",
"=",
"<mask>",
"\n",
"h",
".",
"h",
"=",
"delAllArgsByte... |
7,499 | all-7500 | [
"HostFromLogin",
"returns",
"the",
"policy",
"endpoint",
"from",
"its",
"login",
"endpoint",
".",
"The",
"following",
"isn",
"t",
"great",
"but",
"seems",
"better",
"than",
"having",
"to",
"enter",
"by",
"hand",
"."
] | [
"func",
"HostFromLogin",
"(",
"host",
"string",
")",
"string",
"{",
"urlElems",
":=",
"strings",
".",
"Split",
"(",
"host",
",",
"\"",
"\"",
")",
"\n",
"hostPrefix",
":=",
"urlElems",
"[",
"0",
"]",
"\n",
"elems",
":=",
"strings",
".",
"Split",
"(",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.