id
int32
0
25.3k
idx
stringlengths
5
9
nl_tokens
listlengths
1
418
pl_tokens
listlengths
22
4.98k
21,000
all-21001
[ "NodeIsOutdated", "returns", "true", "if", "there", "s", "some", "cluster", "node", "having", "an", "API", "or", "schema", "version", "greater", "than", "the", "node", "this", "method", "is", "invoked", "on", "." ]
[ "func", "(", "c", "*", "ClusterTx", ")", "NodeIsOutdated", "(", ")", "(", "bool", ",", "error", ")", "{", "nodes", ",", "err", ":=", "c", ".", "nodes", "(", "false", "/* not pending */", ",", "\"", "\"", ")", "\n", "if", "err", "!=", "nil", "{", ...
21,001
all-21002
[ "Send", "sends", "a", "message", ".", "If", "any", "failures", "occur", "with", "specific", "recipients", "the", "error", "will", "be", "an", "appengine", ".", "MultiError", "." ]
[ "func", "(", "m", "*", "Message", ")", "Send", "(", "c", "context", ".", "Context", ")", "error", "{", "req", ":=", "&", "pb", ".", "XmppMessageRequest", "{", "Jid", ":", "m", ".", "To", ",", "Body", ":", "&", "m", ".", "Body", ",", "RawXml", "...
21,002
all-21003
[ "Equal", "checks", "equality", "of", "two", "values", "." ]
[ "func", "Equal", "(", "tb", "testing", ".", "TB", ",", "expected", "interface", "{", "}", ",", "actual", "interface", "{", "}", ",", "msgAndArgs", "...", "interface", "{", "}", ")", "{", "tb", ".", "Helper", "(", ")", "\n", "eV", ",", "aV", ":=", ...
21,003
all-21004
[ "Delete", "implements", "gRPC", "KVServer", ".", "Delete", "deletes", "the", "given", "range", "from", "the", "store", ".", "A", "delete", "request", "increase", "the", "revision", "of", "the", "store", "and", "generates", "one", "event", "in", "the", "event...
[ "func", "(", "s", "*", "etcdStore", ")", "DeleteRange", "(", "ctx", "context", ".", "<mask>", ",", "req", "*", "etcdserverpb", ".", "DeleteRangeRequest", ")", "(", "*", "etcdserverpb", ".", "DeleteRangeResponse", ",", "error", ")", "{", "ireq", ":=", "etcd...
21,004
all-21005
[ "UnescapeHTML", "is", "an", "alias", "for", "html", ".", "UnescapeString", "." ]
[ "func", "UnescapeHTML", "(", "s", "string", ")", "string", "{", "if", "Verbose", "{", "fmt", ".", "Println", "(", "\"", "\"", ")", "\n", "}", "\n", "return", "<mask>", ".", "UnescapeString", "(", "s", ")", "\n", "}" ]
21,005
all-21006
[ "GetUserSpecialDir", "is", "a", "wrapper", "around", "g_get_user_special_dir", "()", ".", "A", "non", "-", "nil", "error", "is", "returned", "in", "the", "case", "that", "g_get_user_special_dir", "()", "returns", "NULL", "to", "differentiate", "between", "NULL", ...
[ "func", "GetUserSpecialDir", "(", "<mask>", "UserDirectory", ")", "(", "string", ",", "error", ")", "{", "c", ":=", "C", ".", "g_get_user_special_dir", "(", "C", ".", "GUserDirectory", "(", "directory", ")", ")", "\n", "if", "c", "==", "nil", "{", "retur...
21,006
all-21007
[ "InspectFile", "returns", "info", "about", "a", "specific", "file", "." ]
[ "func", "(", "c", "APIClient", ")", "InspectFile", "(", "repoName", "string", ",", "commitID", "string", ",", "<mask>", "string", ")", "(", "*", "pfs", ".", "FileInfo", ",", "error", ")", "{", "return", "c", ".", "inspectFile", "(", "repoName", ",", "c...
21,007
all-21008
[ "database", "connection" ]
[ "func", "(", "c", "*", "conn", ")", "PrepareContext", "(", "ctx", "context", ".", "Context", ",", "query", "string", ")", "(", "stmt", "driver", ".", "Stmt", ",", "err", "error", ")", "{", "if", "c", ".", "session", ".", "IsBad", "(", ")", "{", "...
21,008
all-21009
[ "SetChildPacking", "()", "is", "a", "wrapper", "around", "gtk_box_set_child_packing", "()", "." ]
[ "func", "(", "v", "*", "Box", ")", "SetChildPacking", "(", "child", "IWidget", ",", "expand", ",", "fill", "bool", ",", "padding", "uint", ",", "packType", "PackType", ")", "{", "C", ".", "gtk_box_set_child_packing", "(", "v", ".", "native", "(", ")", ...
21,009
all-21010
[ "ImageExists", "returns", "whether", "an", "image", "with", "the", "given", "fingerprint", "exists", "." ]
[ "func", "(", "c", "*", "Cluster", ")", "ImageExists", "(", "project", "string", ",", "fingerprint", "string", ")", "(", "bool", ",", "error", ")", "{", "err", ":=", "c", ".", "Transaction", "(", "func", "(", "tx", "*", "ClusterTx", ")", "error", "{",...
21,010
all-21011
[ "Transform", "is", "a", "wrapper", "around", "cairo_transform", "." ]
[ "func", "(", "v", "*", "<mask>", ")", "Transform", "(", "matrix", "*", "Matrix", ")", "{", "C", ".", "cairo_transform", "(", "v", ".", "native", "(", ")", ",", "matrix", ".", "native", "(", ")", ")", "\n", "}" ]
21,011
all-21012
[ "toPB", "converts", "an", "internal", "watch", "request", "structure", "to", "its", "protobuf", "WatchRequest", "structure", "." ]
[ "func", "(", "wr", "*", "watchRequest", ")", "toPB", "(", ")", "*", "pb", ".", "WatchRequest", "{", "req", ":=", "&", "pb", ".", "WatchCreateRequest", "{", "StartRevision", ":", "wr", ".", "rev", ",", "<mask>", ":", "[", "]", "byte", "(", "wr", "."...
21,012
all-21013
[ "IsDeadKey", "returns", "true", "if", "the", "pressed", "key", "is", "the", "first", "key", "in", "the", "key", "sequence", "understood", "by", "composer", ".", "Dead", "key", "is", "never", "sent", "to", "any", "control" ]
[ "func", "IsDeadKey", "(", "key", "term", ".", "Key", ")", "bool", "{", "if", "key", "==", "term", ".", "KeyCtrlS", "||", "key", "==", "term", ".", "KeyCtrlP", "||", "key", "==", "term", ".", "KeyCtrlW", "||", "key", "==", "term", ".", "KeyCtrlQ", "...
21,013
all-21014
[ "NextBackOff", "..." ]
[ "func", "(", "b", "*", "ConstantBackOff", ")", "NextBackOff", "(", ")", "<mask>", ".", "Duration", "{", "if", "b", ".", "MaxElapsedTime", "!=", "0", "&&", "b", ".", "GetElapsedTime", "(", ")", ">", "b", ".", "MaxElapsedTime", "{", "return", "Stop", "\n...
21,014
all-21015
[ "HasClientX509CertURL", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "i", "*", "IntegrationGCPCreateRequest", ")", "HasClientX509CertURL", "(", ")", "bool", "{", "if", "i", "!=", "nil", "&&", "i", ".", "ClientX509CertURL", "!=", "nil", "{", "return", "true", "\n", "}", "\n\n", "return", "<mask>", "\n", "}" ]
21,015
all-21016
[ "ContainerListExpanded", "loads", "all", "containers", "across", "all", "projects", "and", "expands", "their", "config", "and", "devices", "using", "the", "profiles", "they", "are", "associated", "to", "." ]
[ "func", "(", "c", "*", "ClusterTx", ")", "ContainerListExpanded", "(", ")", "(", "[", "]", "Container", ",", "error", ")", "{", "containers", ",", "err", ":=", "c", ".", "ContainerList", "(", "ContainerFilter", "{", "}", ")", "\n", "if", "err", "!=", ...
21,016
all-21017
[ "FindApproverOwnersForFile", "returns", "the", "OWNERS", "file", "path", "furthest", "down", "the", "tree", "for", "a", "specified", "file", "that", "contains", "an", "approvers", "section" ]
[ "func", "(", "o", "*", "RepoOwners", ")", "FindApproverOwnersForFile", "(", "path", "string", ")", "string", "{", "return", "findOwnersForFile", "(", "o", ".", "log", ",", "<mask>", ",", "o", ".", "approvers", ")", "\n", "}" ]
21,017
all-21018
[ "HeaderBarNew", "is", "a", "wrapper", "around", "gtk_header_bar_new", "()", "." ]
[ "func", "HeaderBarNew", "(", ")", "(", "*", "HeaderBar", ",", "error", ")", "{", "c", ":=", "C", ".", "gtk_header_bar_new", "(", ")", "\n", "if", "c", "==", "nil", "{", "<mask>", "nil", ",", "nilPtrErr", "\n", "}", "\n", "return", "wrapHeaderBar", "(...
21,018
all-21019
[ "Pop", "removes", "the", "topmost", "item", "from", "the", "stack", "and", "return", "its", "value", ".", "If", "the", "stack", "is", "empty", "Pop", "returns", "nil", "." ]
[ "func", "(", "s", "*", "VecStack", ")", "Pop", "(", ")", "(", "value", "*", "Vec", ")", "{", "if", "s", ".", "size", ">", "0", "{", "value", ",", "s", ".", "<mask>", "=", "s", ".", "top", ".", "value", ",", "s", ".", "top", ".", "next", "...
21,019
all-21020
[ "PeriodicToJobSpec", "generates", "a", "downwardapi", ".", "JobSpec", "out", "of", "a", "Periodic", ".", "Useful", "for", "figuring", "out", "GCS", "paths", "when", "parsing", "jobs", "out", "of", "a", "prow", "config", "." ]
[ "func", "PeriodicToJobSpec", "(", "periodic", "config", ".", "Periodic", ")", "*", "downwardapi", ".", "JobSpec", "{", "return", "&", "downwardapi", ".", "JobSpec", "{", "Type", ":", "prowapi", ".", "PeriodicJob", ",", "Job", ":", "periodic", ".", "<mask>", ...
21,020
all-21021
[ "DeepCopyObject", "is", "an", "autogenerated", "deepcopy", "function", "copying", "the", "receiver", "creating", "a", "new", "runtime", ".", "Object", "." ]
[ "func", "(", "in", "*", "App", ")", "DeepCopyObject", "(", ")", "runtime", ".", "Object", "{", "if", "c", ":=", "<mask>", ".", "DeepCopy", "(", ")", ";", "c", "!=", "nil", "{", "return", "c", "\n", "}", "\n", "return", "nil", "\n", "}" ]
21,021
all-21022
[ "initHeap", "checks", "all", "iterators", "and", "initializes", "our", "heap", "and", "array", "of", "keys", ".", "Whenever", "we", "reverse", "direction", "we", "need", "to", "run", "this", "." ]
[ "func", "(", "s", "*", "MergeIterator", ")", "initHeap", "(", ")", "{", "s", ".", "h", "=", "s", ".", "h", "[", ":", "0", "]", "\n", "for", "idx", ",", "itr", ":=", "range", "s", ".", "all", "{", "if", "!", "itr", ".", "Valid", "(", ")", ...
21,022
all-21023
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "CloseTargetParams", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "<mask>", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget27", "(", "&", ...
21,023
all-21024
[ "Error", "returns", "the", "error", "as", "a", "string" ]
[ "func", "(", "err", "*", "ResourceInitError", ")", "<mask>", "(", ")", "string", "{", "return", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "err", ".", "taskARN", ",", "err", ".", "origErr", ")", "\n", "}" ]
21,024
all-21025
[ "TODO", ":", "use", "syscalls", ":", "http", ":", "//", "pastebin", ".", "com", "/", "9exZG4rh" ]
[ "func", "getNaiveExternalAddress", "(", "port", "int", ")", "*", "NetAddress", "{", "addrs", ",", "err", ":=", "net", ".", "InterfaceAddrs", "(", ")", "\n", "if", "err", "!=", "nil", "{", "PanicCrisis", "(", "Fmt", "(", "\"", "\"", ",", "err", ")", "...
21,025
all-21026
[ "GetCriticalRecoveryOk", "returns", "a", "tuple", "with", "the", "CriticalRecovery", "field", "if", "it", "s", "non", "-", "nil", "zero", "value", "otherwise", "and", "a", "boolean", "to", "check", "if", "the", "value", "has", "been", "set", "." ]
[ "func", "(", "t", "*", "ThresholdCount", ")", "GetCriticalRecoveryOk", "(", ")", "(", "json", ".", "Number", ",", "bool", ")", "{", "if", "t", "==", "nil", "||", "t", ".", "CriticalRecovery", "==", "nil", "{", "return", "\"", "\"", ",", "<mask>", "\n...
21,026
all-21027
[ "CreateContactGroup", "creates", "a", "new", "contact", "group", "." ]
[ "func", "(", "a", "*", "API", ")", "CreateContactGroup", "(", "cfg", "*", "ContactGroup", ")", "(", "*", "ContactGroup", ",", "error", ")", "{", "if", "cfg", "==", "nil", "{", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ")", "\n", ...
21,027
all-21028
[ "NewAttrsFromAttrs", "is", "a", "convenience", "function", "that", "will", "accept", "zero", "or", "more", "existing", "Attrs", "create", "a", "new", "Attrs", "and", "then", "merge", "all", "the", "supplied", "Attrs", "values", "into", "the", "new", "Attrs", ...
[ "func", "NewAttrsFromAttrs", "(", "attrs", "...", "*", "Attrs", ")", "*", "Attrs", "{", "newAttrs", ":=", "NewAttrs", "(", ")", "\n", "for", "_", ",", "attr", ":=", "<mask>", "attrs", "{", "newAttrs", ".", "MergeAttrs", "(", "attr", ")", "\n", "}", "...
21,028
all-21029
[ "AllByName", "finds", "zero", "or", "more", "elements", "with", "the", "provided", "name", "attribute", "." ]
[ "func", "(", "s", "*", "selectable", ")", "AllByName", "(", "<mask>", "string", ")", "*", "MultiSelection", "{", "return", "newMultiSelection", "(", "s", ".", "session", ",", "s", ".", "selectors", ".", "Append", "(", "target", ".", "Name", ",", "name", ...
21,029
all-21030
[ "CheckAlreadyRunning", "checks", "if", "the", "socket", "at", "the", "given", "path", "is", "already", "bound", "to", "a", "running", "LXD", "process", "and", "return", "an", "error", "if", "so", ".", "FIXME", ":", "We", "should", "probably", "rather", "ju...
[ "func", "CheckAlreadyRunning", "(", "<mask>", "string", ")", "error", "{", "// If socket activated, nothing to do", "pid", ",", "err", ":=", "strconv", ".", "Atoi", "(", "os", ".", "Getenv", "(", "\"", "\"", ")", ")", "\n", "if", "err", "==", "nil", "{", ...
21,030
all-21031
[ "ValidateWebhook", "ensures", "that", "the", "provided", "request", "conforms", "to", "the", "format", "of", "a", "GitHub", "webhook", "and", "the", "payload", "can", "be", "validated", "with", "the", "provided", "hmac", "secret", ".", "It", "returns", "the", ...
[ "func", "ValidateWebhook", "(", "w", "http", ".", "ResponseWriter", ",", "r", "*", "http", ".", "Request", ",", "hmacSecret", "[", "]", "byte", ")", "(", "string", ",", "string", ",", "[", "]", "byte", ",", "bool", ",", "int", ")", "{", "defer", "r...
21,031
all-21032
[ "Handle", "satisfies", "hookHandler", "." ]
[ "func", "(", "g", "GithubHook", ")", "Handle", "(", "w", "http", ".", "ResponseWriter", ",", "r", "*", "http", ".", "Request", ",", "repo", "*", "Repo", ")", "(", "int", ",", "error", ")", "{", "if", "r", ".", "Method", "!=", "\"", "\"", "{", "...
21,032
all-21033
[ "BytesPer", "tells", "the", "rate", "per", "period", "at", "which", "bytes", "were", "read", "since", "last", "measurement", "." ]
[ "func", "(", "m", "*", "MeasuredReader", ")", "BytesPer", "(", "perPeriod", "<mask>", ".", "Duration", ")", "uint64", "{", "return", "uint64", "(", "m", ".", "rate", ".", "Rate", "(", "perPeriod", ")", ")", "\n", "}" ]
21,033
all-21034
[ "NewWithAlphabet", "returns", "a", "new", "UUIDv4", "encoded", "with", "base57", "using", "the", "alternative", "alphabet", "abc", "." ]
[ "func", "NewWithAlphabet", "(", "abc", "<mask>", ")", "string", "{", "enc", ":=", "base57", "{", "newAlphabet", "(", "abc", ")", "}", "\n", "return", "enc", ".", "Encode", "(", "uuid", ".", "New", "(", ")", ")", "\n", "}" ]
21,034
all-21035
[ "equal", "returns", "true", "only", "if", "both", "signatures", "are", "exactly", "equal", "." ]
[ "func", "(", "s", "*", "Signature", ")", "<mask>", "(", "r", "*", "Signature", ")", "bool", "{", "if", "s", ".", "State", "!=", "r", ".", "State", "||", "!", "s", ".", "CreatedBy", ".", "equal", "(", "&", "r", ".", "CreatedBy", ")", "||", "s", ...
21,035
all-21036
[ "ParseInt", "parses", "a", "decimanl", "representation", "of", "an", "int64", "from", "b", ".", "The", "function", "is", "equivalent", "to", "calling", "strconv", ".", "ParseInt", "(", "string", "(", "b", ")", "10", "64", ")", "but", "it", "prevents", "G...
[ "func", "ParseInt", "(", "b", "[", "]", "byte", ")", "(", "int64", ",", "error", ")", "{", "var", "val", "int64", "\n\n", "if", "len", "(", "b", ")", "==", "0", "{", "return", "0", ",", "errorInvalidUint64", "(", "b", ")", "\n", "}", "\n\n", "i...
21,036
all-21037
[ "Create", "implements", "ClientInterface" ]
[ "func", "(", "c", "*", "dummyClient", ")", "Create", "(", "obj", "<mask>", ")", "(", "Object", ",", "error", ")", "{", "c", ".", "objects", "[", "obj", ".", "GetName", "(", ")", "]", "=", "obj", "\n", "return", "obj", ",", "nil", "\n", "}" ]
21,037
all-21038
[ "waitForGlobalOp", "waits", "for", "the", "global", "operation", "to", "finish", "." ]
[ "func", "(", "c", "*", "ComputeUtil", ")", "waitForGlobalOp", "(", "<mask>", "string", ")", "error", "{", "return", "c", ".", "waitForOp", "(", "func", "(", ")", "(", "*", "raw", ".", "Operation", ",", "error", ")", "{", "return", "c", ".", "service"...
21,038
all-21039
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "SetSinkToUseParams", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "<mask>", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast2", "(", "&", "r...
21,039
all-21040
[ "Closing", "returns", "whether", "the", "child", "is", "closing" ]
[ "func", "(", "pl", "*", "processLink", ")", "ChildClosing", "(", ")", "<-", "chan", "struct", "{", "}", "{", "// grab a hold of it, and unlock, as .Closing may block.", "pl", ".", "Lock", "(", ")", "\n", "child", ":=", "pl", ".", "child", "\n", "pl", ".", ...
21,040
all-21041
[ "resourceVSphereComputeClusterVMHostRuleObjects", "handles", "the", "fetching", "of", "the", "cluster", "and", "rule", "key", "depending", "on", "what", "attributes", "are", "available", ":", "*", "If", "the", "resource", "ID", "is", "available", "the", "data", "i...
[ "func", "resourceVSphereComputeClusterVMHostRuleObjects", "(", "d", "*", "schema", ".", "ResourceData", ",", "meta", "interface", "{", "}", ",", ")", "(", "*", "<mask>", ".", "ClusterComputeResource", ",", "int32", ",", "error", ")", "{", "if", "d", ".", "Id...
21,041
all-21042
[ "newDigestingReader", "returns", "an", "io", ".", "Reader", "implementation", "with", "contents", "of", "source", "which", "will", "eventually", "return", "a", "non", "-", "EOF", "error", "or", "set", "validationSucceeded", "/", "validationFailed", "to", "true", ...
[ "func", "newDigestingReader", "(", "source", "io", ".", "Reader", ",", "expectedDigest", "digest", ".", "Digest", ")", "(", "*", "digestingReader", ",", "error", ")", "{", "if", "err", ":=", "expectedDigest", ".", "Validate", "(", ")", ";", "err", "!=", ...
21,042
all-21043
[ "GetGroupingOk", "returns", "a", "tuple", "with", "the", "Grouping", "field", "if", "it", "s", "non", "-", "nil", "zero", "value", "otherwise", "and", "a", "boolean", "to", "check", "if", "the", "value", "has", "been", "set", "." ]
[ "func", "(", "c", "*", "CheckStatusDefinition", ")", "GetGroupingOk", "(", ")", "(", "string", ",", "bool", ")", "{", "if", "c", "==", "nil", "||", "c", ".", "Grouping", "==", "nil", "{", "return", "\"", "\"", ",", "false", "\n", "}", "\n", "return...
21,043
all-21044
[ "/", "*", "SetLocale", "sets", "the", "locale", "of", "the", "connector", "." ]
[ "func", "(", "c", "*", "Connector", ")", "SetLocale", "(", "locale", "<mask>", ")", "{", "c", ".", "mu", ".", "Lock", "(", ")", "\n", "c", ".", "locale", "=", "locale", "\n", "c", ".", "mu", ".", "Unlock", "(", ")", "\n", "}" ]
21,044
all-21045
[ "currentMonitor", "returns", "the", "monitor", "most", "suitable", "with", "the", "current", "window", ".", "currentMonitor", "must", "be", "called", "on", "the", "main", "thread", "." ]
[ "func", "(", "u", "*", "UserInterface", ")", "currentMonitor", "(", ")", "*", "glfw", ".", "Monitor", "{", "w", ":=", "u", ".", "<mask>", "\n", "if", "m", ":=", "w", ".", "GetMonitor", "(", ")", ";", "m", "!=", "nil", "{", "return", "m", "\n", ...
21,045
all-21046
[ "LogoutURL", "returns", "a", "URL", "that", "when", "visited", "signs", "the", "user", "out", "then", "redirects", "the", "user", "to", "the", "URL", "specified", "by", "dest", "." ]
[ "func", "LogoutURL", "(", "c", "context", ".", "Context", ",", "dest", "string", ")", "(", "string", ",", "error", ")", "{", "req", ":=", "&", "<mask>", ".", "CreateLogoutURLRequest", "{", "DestinationUrl", ":", "proto", ".", "String", "(", "dest", ")", ...
21,046
all-21047
[ "NewCatalogNodesQuery", "parses", "the", "given", "string", "into", "a", "dependency", ".", "If", "the", "name", "is", "empty", "then", "the", "name", "of", "the", "local", "agent", "is", "used", "." ]
[ "func", "NewCatalogNodesQuery", "(", "s", "string", ")", "(", "*", "CatalogNodesQuery", ",", "error", ")", "{", "if", "!", "CatalogNodesQueryRe", ".", "MatchString", "(", "s", ")", "{", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", ...
21,047
all-21048
[ "NewPod", "creates", "a", "new", "pod", "discovery", "." ]
[ "func", "NewPod", "(", "l", "log", ".", "Logger", ",", "pods", "cache", ".", "SharedInformer", ")", "*", "Pod", "{", "if", "l", "==", "nil", "{", "l", "=", "log", ".", "NewNopLogger", "(", ")", "\n", "}", "\n", "p", ":=", "&", "Pod", "{", "info...
21,048
all-21049
[ "--------------------------------------------------------------------" ]
[ "func", "(", "c", "*", "<mask>", ")", "createConsumer", "(", "tomb", "*", "loopTomb", ",", "topic", "string", ",", "partition", "int32", ",", "info", "offsetInfo", ")", "error", "{", "memberID", ",", "_", ":=", "c", ".", "membership", "(", ")", "\n", ...
21,049
all-21050
[ "Warnf", "is", "used", "to", "generate", "warnings", "during", "virtual", "machine", "execution" ]
[ "func", "(", "st", "*", "State", ")", "Warnf", "(", "format", "string", ",", "args", "...", "<mask>", "{", "}", ")", "{", "st", ".", "warn", ".", "Write", "(", "[", "]", "byte", "(", "fmt", ".", "Sprintf", "(", "format", ",", "args", "...", ")"...
21,050
all-21051
[ "toJSON", "converts", "the", "given", "structure", "into", "a", "deeply", "nested", "JSON", "string", "." ]
[ "func", "toJSON", "(", "i", "interface", "{", "}", ")", "(", "string", ",", "error", ")", "{", "result", ",", "err", ":=", "json", ".", "Marshal", "(", "i", ")", "\n", "if", "err", "!=", "nil", "{", "return", "\"", "\"", ",", "errors", ".", "Wr...
21,051
all-21052
[ "Filter", "demangles", "a", "C", "++", "symbol", "name", "returning", "the", "human", "-", "readable", "C", "++", "name", ".", "If", "any", "error", "occurs", "during", "demangling", "the", "input", "string", "is", "returned", "." ]
[ "func", "Filter", "(", "name", "string", ",", "options", "...", "Option", ")", "string", "{", "ret", ",", "err", ":=", "ToString", "(", "name", ",", "<mask>", "...", ")", "\n", "if", "err", "!=", "nil", "{", "return", "name", "\n", "}", "\n", "retu...
21,052
all-21053
[ "getSuitableAlgFromCurve", "inspects", "the", "key", "length", "in", "curve", "and", "determines", "the", "corresponding", "jwt", ".", "Algorithm", "." ]
[ "func", "getSuitableAlgFromCurve", "(", "curve", "elliptic", ".", "Curve", ")", "(", "jwt", ".", "Algorithm", ",", "error", ")", "{", "curveBitSize", ":=", "curve", ".", "Params", "(", ")", ".", "BitSize", "\n\n", "// compute curve key len", "keyLen", ":=", ...
21,053
all-21054
[ "LocalStorage", "creates", "a", "local", "chunk", "storage", "instance", ".", "Useful", "for", "storage", "layer", "tests", "." ]
[ "func", "LocalStorage", "(", "tb", "testing", ".", "TB", ")", "(", "obj", ".", "Client", ",", "*", "Storage", ")", "{", "wd", ",", "err", ":=", "os", ".", "Getwd", "(", ")", "\n", "<mask>", ".", "NoError", "(", "tb", ",", "err", ")", "\n", "obj...
21,054
all-21055
[ "DiskMigrateRelocateOperation", "assembles", "the", "VirtualMachineRelocateSpecDiskLocator", "slice", "for", "a", "virtual", "machine", "migration", "operation", "otherwise", "known", "as", "storage", "vMotion", "." ]
[ "func", "DiskMigrateRelocateOperation", "(", "d", "*", "schema", ".", "ResourceData", ",", "c", "*", "govmomi", ".", "Client", ",", "l", "object", ".", "VirtualDeviceList", ")", "(", "[", "]", "types", ".", "VirtualMachineRelocateSpecDiskLocator", ",", "bool", ...
21,055
all-21056
[ "ChangeSvcCheckTimeperiod", "creates", "a", "new", "CHANGE_SVC_CHECK_TIMEPERIOD", "Nagios", "command", ".", "Changes", "the", "check", "timeperiod", "for", "a", "particular", "service", "to", "what", "is", "specified", "by", "the", "check_timeperiod", "option", ".", ...
[ "func", "ChangeSvcCheckTimeperiod", "(", "host_name", "string", ",", "service_description", "string", ",", "check_timeperiod", "string", ",", ")", "*", "livestatus", ".", "Command", "{", "<mask>", "livestatus", ".", "NewCommand", "(", "\"", "\"", ",", "stringifyAr...
21,056
all-21057
[ "MiddlewareFunc", "makes", "RecorderMiddleware", "implement", "the", "Middleware", "interface", "." ]
[ "func", "(", "mw", "*", "RecorderMiddleware", ")", "MiddlewareFunc", "(", "h", "HandlerFunc", ")", "HandlerFunc", "{", "return", "func", "(", "w", "ResponseWriter", ",", "r", "*", "Request", ")", "{", "<mask>", ":=", "&", "recorderResponseWriter", "{", "w", ...
21,057
all-21058
[ "Do", "executes", "Overlay", ".", "setShowFPSCounter", "against", "the", "provided", "context", "." ]
[ "func", "(", "p", "*", "SetShowFPSCounterParams", ")", "Do", "(", "ctx", "<mask>", ".", "Context", ")", "(", "err", "error", ")", "{", "return", "cdp", ".", "Execute", "(", "ctx", ",", "CommandSetShowFPSCounter", ",", "p", ",", "nil", ")", "\n", "}" ]
21,058
all-21059
[ "Panicf", "is", "equivalent", "to", "l", ".", "Critical", "followed", "by", "a", "call", "to", "panic", "()", "." ]
[ "func", "(", "l", "*", "Logger", ")", "Panicf", "(", "format", "string", ",", "args", "...", "<mask>", "{", "}", ")", "{", "l", ".", "log", "(", "CRITICAL", ",", "&", "format", ",", "args", "...", ")", "\n", "panic", "(", "fmt", ".", "Sprintf", ...
21,059
all-21060
[ "Last", "returns", "the", "last", "error", "in", "the", "list", "or", "nil", ".", "Can", "be", "called", "for", "a", "nil", "ErrorList", "." ]
[ "func", "(", "list", "ErrorList", ")", "Last", "(", ")", "error", "{", "if", "len", "(", "list", ")", "==", "0", "{", "return", "nil", "\n", "}", "\n", "return", "list", "[", "len", "(", "<mask>", ")", "-", "1", "]", "\n", "}" ]
21,060
all-21061
[ "Sign", "produces", "signed", "JWT", "token", "given", "arbitrary", "string", "payload", "signature", "algorithm", "to", "use", "(", "see", "constants", "for", "list", "of", "supported", "algs", ")", "signing", "key", "and", "extra", "options", "(", "see", "...
[ "func", "Sign", "(", "payload", "string", ",", "signingAlg", "string", ",", "key", "interface", "{", "}", ",", "<mask>", "...", "func", "(", "*", "JoseConfig", ")", ")", "(", "token", "string", ",", "err", "error", ")", "{", "return", "SignBytes", "(",...
21,061
all-21062
[ "Copy", "an", "LVM", "custom", "volume", "." ]
[ "func", "(", "s", "*", "storageLvm", ")", "copyVolume", "(", "sourcePool", "string", ",", "source", "string", ")", "error", "{", "targetMntPoint", ":=", "getStoragePoolVolumeMountPoint", "(", "s", ".", "pool", ".", "<mask>", ",", "s", ".", "volume", ".", "...
21,062
all-21063
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "FontFamilies", ")", "UnmarshalJSON", "(", "data", "[", "]", "<mask>", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage49", "(", "&", "r", ...
21,063
all-21064
[ "WithApp", "adds", "the", "app", "to", "the", "delete", "apps", "app", "params" ]
[ "func", "(", "o", "*", "DeleteAppsAppParams", ")", "WithApp", "(", "app", "<mask>", ")", "*", "DeleteAppsAppParams", "{", "o", ".", "SetApp", "(", "app", ")", "\n", "return", "o", "\n", "}" ]
21,064
all-21065
[ "NewLogFilter", "returns", "a", "LevelFilter", "that", "is", "configured", "with", "the", "log", "levels", "that", "we", "use", "." ]
[ "func", "NewLogFilter", "(", ")", "*", "logutils", ".", "LevelFilter", "{", "return", "&", "logutils", ".", "LevelFilter", "{", "Levels", ":", "Levels", ",", "MinLevel", ":", "\"", "\"", ",", "<mask>", ":", "ioutil", ".", "Discard", ",", "}", "\n", "}"...
21,065
all-21066
[ "ConsoleContainer", "requests", "that", "LXD", "attaches", "to", "the", "console", "device", "of", "a", "container", "." ]
[ "func", "(", "r", "*", "ProtocolLXD", ")", "ConsoleContainer", "(", "containerName", "string", ",", "console", "api", ".", "ContainerConsolePost", ",", "args", "*", "ContainerConsoleArgs", ")", "(", "Operation", ",", "error", ")", "{", "if", "!", "r", ".", ...
21,066
all-21067
[ "ChangeMaxSvcCheckAttempts", "creates", "a", "new", "CHANGE_MAX_SVC_CHECK_ATTEMPTS", "Nagios", "command", ".", "Changes", "the", "maximum", "number", "of", "check", "attempts", "(", "retries", ")", "for", "a", "particular", "service", "." ]
[ "func", "ChangeMaxSvcCheckAttempts", "(", "host_name", "string", ",", "service_description", "string", ",", "check_attempts", "int", ",", ")", "*", "livestatus", ".", "Command", "{", "<mask>", "livestatus", ".", "NewCommand", "(", "\"", "\"", ",", "stringifyArg", ...
21,067
all-21068
[ "passive", "to", "close", "fileLogger" ]
[ "func", "(", "f", "*", "FileLogger", ")", "Close", "(", ")", "error", "{", "<mask>", "(", "f", ".", "logChan", ")", "\n", "f", ".", "lg", "=", "nil", "\n\n", "return", "f", ".", "logFile", ".", "Close", "(", ")", "\n", "}" ]
21,068
all-21069
[ "GetCredentialsID", "gets", "the", "credentials", "ID", "for", "the", "task" ]
[ "func", "(", "task", "*", "Task", ")", "GetCredentialsID", "(", ")", "string", "{", "<mask>", ".", "lock", ".", "RLock", "(", ")", "\n", "defer", "task", ".", "lock", ".", "RUnlock", "(", ")", "\n\n", "return", "task", ".", "credentialsID", "\n", "}"...
21,069
all-21070
[ "Unix", "devices", "handling" ]
[ "func", "(", "c", "*", "containerLXC", ")", "createUnixDevice", "(", "prefix", "string", ",", "m", "types", ".", "Device", ",", "defaultMode", "bool", ")", "(", "[", "]", "string", ",", "error", ")", "{", "var", "err", "error", "\n", "var", "major", ...
21,070
all-21071
[ "Check", "returns", "true", "if", "given", "string", "matches", "stored", "." ]
[ "func", "(", "t", "*", "SimpleToken", ")", "Check", "(", "s", "string", ")", "bool", "{", "t", ".", "mtx", ".", "RLock", "(", ")", "\n", "defer", "t", ".", "mtx", ".", "RUnlock", "(", ")", "\n", "return", "s", "==", "t", ".", "<mask>", "\n", ...
21,071
all-21072
[ "patNextSegment", "returns", "the", "next", "segment", "details", "from", "a", "pattern", ":", "node", "type", "param", "key", "regexp", "string", "param", "tail", "byte", "param", "starting", "index", "param", "ending", "index" ]
[ "func", "patNextSegment", "(", "pattern", "string", ")", "(", "nodeTyp", ",", "string", ",", "string", ",", "byte", ",", "int", ",", "int", ")", "{", "ps", ":=", "strings", ".", "Index", "(", "pattern", ",", "\"", "\"", ")", "\n", "ws", ":=", "stri...
21,072
all-21073
[ "copyLayer", "copies", "a", "layer", "with", "srcInfo", "(", "with", "known", "Digest", "and", "possibly", "known", "Size", ")", "in", "src", "to", "dest", "perhaps", "compressing", "it", "if", "canCompress", "and", "returns", "a", "complete", "blobInfo", "o...
[ "func", "(", "ic", "*", "imageCopier", ")", "copyLayer", "(", "ctx", "context", ".", "Context", ",", "srcInfo", "types", ".", "BlobInfo", ",", "pool", "*", "mpb", ".", "Progress", ")", "(", "types", ".", "BlobInfo", ",", "digest", ".", "Digest", ",", ...
21,073
all-21074
[ "NewAuthenticator", "constructs", "a", "new", "Authenticator", "from", "a", "store", "and", "policy", "." ]
[ "func", "NewAuthenticator", "(", "store", "*", "coal", ".", "Store", ",", "policy", "*", "Policy", ")", "*", "Authenticator", "{", "// initialize token", "coal", ".", "Init", "(", "policy", ".", "Token", ")", "\n\n", "// initialize clients", "for", "_", ",",...
21,074
all-21075
[ "ParseIPv4", "parses", "ip", "address", "from", "ipStr", "into", "dst", "and", "returns", "the", "extended", "dst", "." ]
[ "func", "ParseIPv4", "(", "dst", "net", ".", "IP", ",", "ipStr", "[", "]", "byte", ")", "(", "net", ".", "IP", ",", "error", ")", "{", "if", "len", "(", "ipStr", ")", "==", "0", "{", "return", "dst", ",", "errEmptyIPStr", "\n", "}", "\n", "if",...
21,075
all-21076
[ "multiply", "the", "current", "matrix", "with", "an", "orthographic", "matrix" ]
[ "func", "Ortho", "(", "left", "float64", ",", "right", "float64", ",", "bottom", "float64", ",", "<mask>", "float64", ",", "zNear", "float64", ",", "zFar", "float64", ")", "{", "syscall", ".", "Syscall6", "(", "gpOrtho", ",", "6", ",", "uintptr", "(", ...
21,076
all-21077
[ "StoragePoolConfigAdd", "adds", "a", "new", "entry", "in", "the", "storage_pools_config", "table" ]
[ "func", "(", "c", "*", "ClusterTx", ")", "StoragePoolConfigAdd", "(", "poolID", ",", "nodeID", "int64", ",", "config", "map", "[", "string", "]", "string", ")", "error", "{", "return", "storagePoolConfigAdd", "(", "c", ".", "<mask>", ",", "poolID", ",", ...
21,077
all-21078
[ "addToStatsContainerMapUnsafe", "adds", "the", "statscontainer", "into", "stats", "for", "tracking", "and", "returns", "a", "boolean", "indicates", "whether", "this", "container", "should", "be", "tracked", "for", "collecting", "metrics" ]
[ "func", "(", "engine", "*", "DockerStatsEngine", ")", "addToStatsContainerMapUnsafe", "(", "taskARN", ",", "containerID", "string", ",", "statsContainer", "*", "StatsContainer", ",", "statsMapToUpdate", "func", "(", ")", "map", "[", "string", "]", "map", "[", "s...
21,078
all-21079
[ "NewStreamAt", "creates", "a", "new", "Stream", "at", "a", "particular", "timestamp", ".", "Should", "only", "be", "used", "with", "managed", "DB", "." ]
[ "func", "(", "db", "*", "DB", ")", "NewStreamAt", "(", "readTs", "uint64", ")", "*", "Stream", "{", "if", "!", "db", ".", "opt", ".", "managedTxns", "{", "panic", "(", "\"", "\"", ")", "\n", "}", "\n", "stream", ":=", "db", ".", "newStream", "(",...
21,079
all-21080
[ "APIURL", "-", "Establishes", "the", "ApiURL", "given", "a", "whether", "the", "Label", "is", "a", "Person", "Organisation", "or", "Company", "(", "Public", "or", "Private", ")" ]
[ "func", "APIURL", "(", "uuid", "string", ",", "labels", "[", "]", "string", ",", "env", "string", ")", "string", "{", "base", ":=", "\"", "\"", "\n", "if", "env", "==", "\"", "\"", "{", "base", "=", "\"", "\"", "\n", "}", "\n\n", "path", ":=", ...
21,080
all-21081
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "TakeTypeProfileParams", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler3", "(", "&",...
21,081
all-21082
[ "Update", "returns", "the", "difference", "between", "two", "sets" ]
[ "func", "(", "list", "Devices", ")", "Update", "(", "newlist", "Devices", ")", "(", "map", "[", "string", "]", "Device", ",", "map", "[", "string", "]", "Device", ",", "map", "[", "string", "]", "Device", ",", "[", "]", "string", ")", "{", "rmlist"...
21,082
all-21083
[ "ConfigureNetworks", "updates", "the", "agent", "settings", "with", "the", "networks", "settings", "." ]
[ "func", "(", "<mask>", "AgentSettings", ")", "ConfigureNetworks", "(", "networksSettings", "NetworksSettings", ")", "AgentSettings", "{", "as", ".", "Networks", "=", "networksSettings", "\n\n", "return", "as", "\n", "}" ]
21,083
all-21084
[ "returns", "ipfs", "version", "and", "commit", "sha" ]
[ "func", "(", "s", "*", "Shell", ")", "Version", "(", ")", "(", "string", ",", "string", ",", "error", ")", "{", "ver", ":=", "struct", "{", "Version", "string", "\n", "Commit", "string", "\n", "}", "{", "}", "\n\n", "if", "err", ":=", "s", ".", ...
21,084
all-21085
[ "MutateSetOptions", "for", "Thresholds", "sets", "the", "SetOptionsOp", "s", "thresholds", "fields" ]
[ "func", "(", "m", "Thresholds", ")", "MutateSetOptions", "(", "o", "*", "xdr", ".", "SetOptionsOp", ")", "(", "err", "<mask>", ")", "{", "if", "m", ".", "Low", "!=", "nil", "{", "val", ":=", "xdr", ".", "Uint32", "(", "*", "m", ".", "Low", ")", ...
21,085
all-21086
[ "Uint64Var", "defines", "a", "uint64", "flag", "with", "specified", "name", "default", "value", "and", "usage", "string", ".", "The", "argument", "p", "points", "to", "a", "uint64", "variable", "in", "which", "to", "store", "the", "value", "of", "the", "fl...
[ "func", "Uint64Var", "(", "p", "*", "uint64", ",", "name", "string", ",", "value", "uint64", ",", "usage", "string", ")", "{", "EnvironmentFlags", ".", "Uint64Var", "(", "p", ",", "name", ",", "<mask>", ",", "usage", ")", "\n", "}" ]
21,086
all-21087
[ "title", ":", "delete", "autoscale", "rule", "path", ":", "/", "autoscale", "/", "rules", "/", "{", "id", "}", "method", ":", "DELETE", "responses", ":", "200", ":", "Ok", "401", ":", "Unauthorized", "404", ":", "Not", "found" ]
[ "func", "autoScaleDeleteRule", "(", "w", "http", ".", "ResponseWriter", ",", "r", "*", "http", ".", "Request", ",", "t", "auth", ".", "Token", ")", "(", "err", "error", ")", "{", "allowedDeleteRule", ":=", "permission", ".", "Check", "(", "t", ",", "pe...
21,087
all-21088
[ "Start", "starts", "the", "existing", "VM", "instance", "." ]
[ "func", "(", "d", "*", "Driver", ")", "Start", "(", ")", "error", "{", "<mask>", ":=", "d", ".", "client", "(", ")", "\n", "_", ",", "err", ":=", "cs", ".", "RequestWithContext", "(", "context", ".", "TODO", "(", ")", ",", "&", "egoscale", ".", ...
21,088
all-21089
[ "GetApplicationID", "is", "a", "wrapper", "around", "g_application_get_application_id", "()", "." ]
[ "func", "(", "v", "*", "Application", ")", "GetApplicationID", "(", ")", "string", "{", "c", ":=", "C", ".", "g_application_get_application_id", "(", "v", ".", "native", "(", ")", ")", "\n\n", "return", "C", ".", "GoString", "(", "(", "*", "C", ".", ...
21,089
all-21090
[ "flattenClusterDrsVmConfigInfo", "saves", "a", "ClusterDrsVmConfigInfo", "into", "the", "supplied", "ResourceData", "." ]
[ "func", "flattenClusterDrsVMConfigInfo", "(", "d", "*", "schema", ".", "ResourceData", ",", "obj", "*", "<mask>", ".", "ClusterDrsVmConfigInfo", ")", "error", "{", "return", "structure", ".", "SetBatch", "(", "d", ",", "map", "[", "string", "]", "interface", ...
21,090
all-21091
[ "ContentType", "returns", "a", "valid", "content", "type" ]
[ "func", "(", "r", "*", "<mask>", ")", "ContentType", "(", ")", "string", "{", "if", "r", ".", "contentType", "==", "\"", "\"", "{", "r", ".", "contentType", "=", "\"", "\"", "\n", "}", "\n", "return", "r", ".", "contentType", "\n", "}" ]
21,091
all-21092
[ "get", "returns", "the", "value", "in", "memtable", "or", "disk", "for", "given", "key", ".", "Note", "that", "value", "will", "include", "meta", "byte", ".", "IMPORTANT", ":", "We", "should", "never", "write", "an", "entry", "with", "an", "older", "time...
[ "func", "(", "<mask>", "*", "DB", ")", "get", "(", "key", "[", "]", "byte", ")", "(", "y", ".", "ValueStruct", ",", "error", ")", "{", "tables", ",", "decr", ":=", "db", ".", "getMemTables", "(", ")", "// Lock should be released.", "\n", "defer", "de...
21,092
all-21093
[ "Calculates", "the", "per", "-", "element", "bit", "-", "wise", "“exclusive", "or”", "operation", "on", "two", "arrays", "with", "a", "mask", "." ]
[ "func", "XorWithMask", "(", "src1", ",", "src2", ",", "dst", ",", "<mask>", "*", "IplImage", ")", "{", "C", ".", "cvXor", "(", "unsafe", ".", "Pointer", "(", "src1", ")", ",", "unsafe", ".", "Pointer", "(", "src2", ")", ",", "unsafe", ".", "Pointer...
21,093
all-21094
[ "Publish", "message", "to", "given", "channels", "." ]
[ "func", "Publish", "(", "channels", "[", "]", "string", ",", "<mask>", "interface", "{", "}", ")", "error", "{", "if", "hubInstance", "==", "nil", "{", "return", "errorNohub", "\n", "}", "\n", "log", ".", "Debug", "(", "\"", "\"", ",", "channels", ")...
21,094
all-21095
[ "RemoveImage", "mocks", "base", "method" ]
[ "func", "(", "m", "*", "MockDockerClient", ")", "RemoveImage", "(", "arg0", "<mask>", ".", "Context", ",", "arg1", "string", ",", "arg2", "time", ".", "Duration", ")", "error", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "...
21,095
all-21096
[ "HasPalette", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "c", "*", "ConditionalFormat", ")", "HasPalette", "(", ")", "bool", "{", "if", "c", "!=", "nil", "&&", "c", ".", "Palette", "!=", "nil", "{", "return", "<mask>", "\n", "}", "\n\n", "return", "false", "\n", "}" ]
21,096
all-21097
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "GetPossibleBreakpointsParams", ")", "UnmarshalJSON", "(", "<mask>", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger36", "...
21,097
all-21098
[ "finishesCall", "checks", "whether", "this", "frame", "is", "the", "last", "one", "we", "should", "expect", "for", "this", "RPC", "req", "-", "res", "." ]
[ "func", "finishesCall", "(", "f", "*", "Frame", ")", "bool", "{", "switch", "f", ".", "messageType", "(", ")", "{", "case", "messageTypeError", ":", "return", "true", "\n", "<mask>", "messageTypeCallRes", ",", "messageTypeCallResContinue", ":", "flags", ":=", ...
21,098
all-21099
[ "SetText", "()", "is", "a", "wrapper", "around", "gtk_progress_bar_set_text", "()", "." ]
[ "func", "(", "v", "*", "ProgressBar", ")", "SetText", "(", "text", "string", ")", "{", "cstr", ":=", "C", ".", "CString", "(", "text", ")", "\n", "defer", "C", ".", "<mask>", "(", "unsafe", ".", "Pointer", "(", "cstr", ")", ")", "\n", "C", ".", ...
21,099
all-21100
[ "Draw", "a", "line", "with", "an", "angle", "with", "specified", "line", "cap", "and", "join" ]
[ "func", "Draw", "(", "gc", "draw2d", ".", "GraphicContext", ",", "cap", "draw2d", ".", "LineCap", ",", "join", "draw2d", ".", "LineJoin", ",", "x0", ",", "y0", ",", "x1", ",", "y1", ",", "offset", "float64", ")", "{", "gc", ".", "SetLineCap", "(", ...