id
int32
0
25.3k
idx
stringlengths
5
9
nl_tokens
listlengths
1
418
pl_tokens
listlengths
22
4.98k
2,800
all-2801
[ "Receive", "logStr", "from", "f", "s", "logChan", "and", "print", "logstr", "to", "file" ]
[ "func", "(", "f", "*", "FileLogger", ")", "logWriter", "(", ")", "{", "defer", "func", "(", ")", "{", "if", "err", ":=", "recover", "(", ")", ";", "err", "!=", "nil", "{", "log", ".", "Printf", "(", "\"", "\\n", "\"", ",", "err", ")", "\n", "...
2,801
all-2802
[ "CreateEtcdClientConfig", "creates", "a", "client", "configuration", "from", "member", "." ]
[ "func", "(", "m", "*", "Member", ")", "CreateEtcdClientConfig", "(", "opts", "...", "grpc", ".", "DialOption", ")", "(", "cfg", "*", "clientv3", ".", "Config", ",", "err", "error", ")", "{", "secure", ":=", "false", "\n", "for", "_", ",", "cu", ":=",...
2,802
all-2803
[ "suitableType", "returns", "the", "DNS", "resource", "record", "type", "suitable", "for", "the", "target", ".", "In", "this", "case", "type", "A", "for", "IPs", "and", "type", "CNAME", "for", "everything", "else", "." ]
[ "func", "suitableType", "(", "target", "string", ")", "string", "{", "if", "<mask>", ".", "ParseIP", "(", "target", ")", "!=", "nil", "{", "return", "endpoint", ".", "RecordTypeA", "\n", "}", "\n", "return", "endpoint", ".", "RecordTypeCNAME", "\n", "}" ]
2,803
all-2804
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "GetAllCookiesParams", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork39", "(", "&", ...
2,804
all-2805
[ "StopAckTimer", "stops", "the", "ack", "timer", "set", "on", "the", "ENI", "attachment" ]
[ "func", "(", "eni", "*", "ENIAttachment", ")", "StopAckTimer", "(", ")", "{", "eni", ".", "<mask>", ".", "Lock", "(", ")", "\n", "defer", "eni", ".", "guard", ".", "Unlock", "(", ")", "\n\n", "eni", ".", "ackTimer", ".", "Stop", "(", ")", "\n", "...
2,805
all-2806
[ "SetWriteStrategy", "..." ]
[ "func", "(", "c", "*", "Cache", ")", "SetWriteStrategy", "(", "s", "string", ")", "(", "err", "error", ")", "{", "c", ".", "Lock", "(", ")", "\n", "defer", "c", ".", "Unlock", "(", ")", "\n\n", "switch", "s", "{", "case", "\"", "\"", ":", "c", ...
2,806
all-2807
[ "ValidateLength", "checks", "whether", "the", "given", "data", "match", "the", "given", "rules", ".", "It", "checks", "if", "the", "value", "has", "more", "or", "equal", "min", "chars", "and", "less", "or", "equal", "max", "chars", ".", "If", "you", "don...
[ "func", "ValidateLength", "(", "value", "string", ",", "min", ",", "max", "int", ")", "bool", "{", "l", ":=", "len", "(", "value", ")", "\n", "if", "min", ">", "0", "&&", "l", "<", "<mask>", "{", "return", "false", "\n", "}", "\n", "if", "max", ...
2,807
all-2808
[ "Load", "all", "containers", "of", "this", "nodes", "under", "the", "given", "project", "." ]
[ "func", "containerLoadNodeProjectAll", "(", "s", "*", "state", ".", "State", ",", "project", "string", ")", "(", "[", "]", "container", ",", "error", ")", "{", "// Get all the container arguments", "var", "cts", "[", "]", "db", ".", "Container", "\n", "err",...
2,808
all-2809
[ "ParsePeerUID", "parses", "a", "decimal", "peer", "UID", "from", "a", "string", "." ]
[ "func", "parsePeerUID", "(", "s", "string", ")", "(", "PeerUID", ",", "error", ")", "{", "uid", ",", "err", ":=", "strconv", ".", "ParseUint", "(", "s", ",", "10", ",", "64", ")", "\n", "return", "PeerUID", "(", "uid", ")", ",", "<mask>", "\n", "...
2,809
all-2810
[ "DescribeECSTagsForInstance", "mocks", "base", "method" ]
[ "func", "(", "m", "*", "MockClient", ")", "DescribeECSTagsForInstance", "(", "arg0", "string", ")", "(", "[", "]", "*", "ecs", ".", "Tag", ",", "error", ")", "{", "<mask>", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg...
2,810
all-2811
[ "FieldParams", "converts", "the", "given", "fields", "to", "function", "parameters", "rendering", "their", "name", "." ]
[ "func", "FieldParams", "(", "fields", "[", "]", "*", "Field", ")", "string", "{", "args", ":=", "make", "(", "[", "]", "string", ",", "len", "(", "fields", ")", ")", "\n", "for", "i", ",", "field", ":=", "range", "fields", "{", "args", "[", "i", ...
2,811
all-2812
[ "New", "--" ]
[ "func", "(", "s", "*", "FakeSku", ")", "New", "(", "tm", "skurepo", ".", "TaskManager", ",", "procurementMeta", "<mask>", "[", "string", "]", "interface", "{", "}", ")", "skurepo", ".", "Sku", "{", "return", "s", "\n", "}" ]
2,812
all-2813
[ "readFiles", "reads", "files", "and", "returns", "source", "for", "the", "parsing", "process", "." ]
[ "func", "readFiles", "(", "basePath", ",", "innerPath", "string", ",", "opts", "*", "Options", ")", "(", "*", "source", ",", "error", ")", "{", "// Read the base file.", "base", ",", "err", ":=", "readFile", "(", "basePath", ",", "opts", ")", "\n", "if",...
2,813
all-2814
[ "cloneEnv", "encodes", "clonerefs", "Options", "into", "json", "and", "puts", "it", "into", "an", "environment", "variable" ]
[ "func", "cloneEnv", "(", "opt", "clonerefs", ".", "Options", ")", "(", "[", "]", "coreapi", ".", "EnvVar", ",", "error", ")", "{", "// TODO(fejta): use flags", "cloneConfigEnv", ",", "err", ":=", "clonerefs", ".", "Encode", "(", "<mask>", ")", "\n", "if", ...
2,814
all-2815
[ "RemoveTextFunc", "a", "text", "metric", "function" ]
[ "func", "(", "m", "*", "CirconusMetrics", ")", "RemoveTextFunc", "(", "metric", "string", ")", "{", "m", ".", "tfm", ".", "Lock", "(", ")", "\n", "defer", "m", ".", "tfm", ".", "Unlock", "(", ")", "\n", "<mask>", "(", "m", ".", "textFuncs", ",", ...
2,815
all-2816
[ "NotFoundHandler", "returns", "the", "default", "Mux", "404", "responder", "whenever", "a", "route", "cannot", "be", "found", "." ]
[ "func", "(", "mx", "*", "Mux", ")", "NotFoundHandler", "(", ")", "<mask>", ".", "HandlerFunc", "{", "if", "mx", ".", "notFoundHandler", "!=", "nil", "{", "return", "mx", ".", "notFoundHandler", "\n", "}", "\n", "return", "http", ".", "NotFound", "\n", ...
2,816
all-2817
[ "GetCreateFlags", "returns", "list", "of", "create", "flags", "driver", "accepts", "." ]
[ "func", "(", "d", "*", "Driver", ")", "GetCreateFlags", "(", ")", "[", "]", "mcnflag", ".", "Flag", "{", "return", "[", "]", "mcnflag", ".", "Flag", "{", "mcnflag", ".", "StringFlag", "{", "Name", ":", "flAzureEnvironment", ",", "Usage", ":", "\"", "...
2,817
all-2818
[ "GetResource", "returns", "the", "Resource", "field", "if", "non", "-", "nil", "zero", "value", "otherwise", "." ]
[ "func", "(", "r", "*", "reqGetDashboard", ")", "GetResource", "(", ")", "string", "{", "if", "r", "==", "nil", "||", "r", ".", "<mask>", "==", "nil", "{", "return", "\"", "\"", "\n", "}", "\n", "return", "*", "r", ".", "Resource", "\n", "}" ]
2,818
all-2819
[ "Do", "executes", "Network", ".", "setBlockedURLs", "against", "the", "provided", "context", "." ]
[ "func", "(", "p", "*", "SetBlockedURLSParams", ")", "Do", "(", "ctx", "<mask>", ".", "Context", ")", "(", "err", "error", ")", "{", "return", "cdp", ".", "Execute", "(", "ctx", ",", "CommandSetBlockedURLS", ",", "p", ",", "nil", ")", "\n", "}" ]
2,819
all-2820
[ "ClientAfterUncooperativeCloseRequest", "waits", "for", "the", "channel", "to", "uncooperative", "close", "starts", "the", "service", "termination", "process", "." ]
[ "func", "(", "w", "*", "Worker", ")", "ClientAfterUncooperativeCloseRequest", "(", "job", "*", "<mask>", ".", "Job", ")", "error", "{", "logger", ":=", "w", ".", "logger", ".", "Add", "(", "\"", "\"", ",", "\"", "\"", ",", "\"", "\"", ",", "job", "...
2,820
all-2821
[ "WithSort", "specifies", "the", "ordering", "in", "Get", "request", ".", "It", "requires", "WithRange", "and", "/", "or", "WithPrefix", "to", "be", "specified", "too", ".", "target", "specifies", "the", "target", "to", "sort", "by", ":", "key", "version", ...
[ "func", "WithSort", "(", "target", "SortTarget", ",", "order", "SortOrder", ")", "OpOption", "{", "return", "func", "(", "op", "*", "Op", ")", "{", "if", "target", "==", "SortByKey", "&&", "order", "==", "SortAscend", "{", "// If order != SortNone, server fetc...
2,821
all-2822
[ "ApplyChanges", "applies", "a", "given", "set", "of", "changes", "in", "a", "given", "zone", "." ]
[ "func", "(", "p", "*", "AWSProvider", ")", "ApplyChanges", "(", "changes", "*", "plan", ".", "Changes", ")", "error", "{", "zones", ",", "err", ":=", "p", ".", "Zones", "(", ")", "\n", "if", "err", "!=", "nil", "{", "return", "err", "\n", "}", "\...
2,822
all-2823
[ "BatchSize", "returns", "a", "derivative", "query", "to", "fetch", "the", "supplied", "number", "of", "results", "at", "once", ".", "This", "value", "should", "be", "greater", "than", "zero", "and", "equal", "to", "or", "less", "than", "the", "Limit", "." ...
[ "func", "(", "q", "*", "<mask>", ")", "BatchSize", "(", "size", "int", ")", "*", "Query", "{", "q", "=", "q", ".", "clone", "(", ")", "\n", "if", "size", "<=", "0", "||", "size", ">", "math", ".", "MaxInt32", "{", "q", ".", "err", "=", "error...
2,823
all-2824
[ "NewSelectiveStringsValue", "creates", "a", "new", "string", "slice", "flag", "for", "which", "any", "one", "of", "the", "given", "strings", "is", "a", "valid", "value", "and", "any", "other", "value", "is", "an", "error", "." ]
[ "func", "NewSelectiveStringsValue", "(", "valids", "...", "string", ")", "*", "SelectiveStringsValue", "{", "vm", ":=", "make", "(", "map", "[", "string", "]", "struct", "{", "}", ")", "\n", "for", "_", ",", "v", ":=", "range", "valids", "{", "vm", "["...
2,824
all-2825
[ "Retry", "returns", "true", "if", "this", "error", "should", "be", "considered", "retriable" ]
[ "func", "(", "err", "*", "WSError", ")", "Retry", "(", ")", "bool", "{", "for", "_", ",", "unretriable", ":=", "range", "err", ".", "Get", "(", ")", "{", "if", "reflect", ".", "TypeOf", "(", "err", ".", "ErrObj", ")", "==", "reflect", ".", "TypeO...
2,825
all-2826
[ "Do", "executes", "Page", ".", "setProduceCompilationCache", "against", "the", "provided", "context", "." ]
[ "func", "(", "p", "*", "SetProduceCompilationCacheParams", ")", "Do", "(", "ctx", "<mask>", ".", "Context", ")", "(", "err", "error", ")", "{", "return", "cdp", ".", "Execute", "(", "ctx", ",", "CommandSetProduceCompilationCache", ",", "p", ",", "nil", ")"...
2,826
all-2827
[ "Write", "implements", "Handler", "interface" ]
[ "func", "(", "h", "*", "RotatingFileHandler", ")", "Write", "(", "p", "[", "]", "<mask>", ")", "(", "n", "int", ",", "err", "error", ")", "{", "h", ".", "doRollover", "(", ")", "\n", "n", ",", "err", "=", "h", ".", "fd", ".", "Write", "(", "p...
2,827
all-2828
[ "CreateVM", "creates", "a", "virtual", "machine", "on", "a", "datastore", "cluster", "via", "the", "StorageResourceManager", "API", ".", "It", "mimics", "our", "helper", "in", "the", "virtualmachine", "package", "in", "functionality", "returning", "a", "VM", "he...
[ "func", "CreateVM", "(", "client", "*", "govmomi", ".", "Client", ",", "fo", "*", "object", ".", "Folder", ",", "spec", "types", ".", "VirtualMachineConfigSpec", ",", "pool", "*", "object", ".", "ResourcePool", ",", "host", "*", "object", ".", "HostSystem"...
2,828
all-2829
[ "GetSignatures", "returns", "the", "image", "s", "signatures", ".", "It", "may", "use", "a", "remote", "(", "=", "slow", ")", "service", ".", "If", "instanceDigest", "is", "not", "nil", "it", "contains", "a", "digest", "of", "the", "specific", "manifest", ...
[ "func", "(", "*", "tarballImageSource", ")", "GetSignatures", "(", "ctx", "context", ".", "<mask>", ",", "instanceDigest", "*", "digest", ".", "Digest", ")", "(", "[", "]", "[", "]", "byte", ",", "error", ")", "{", "if", "instanceDigest", "!=", "nil", ...
2,829
all-2830
[ "roleGetCommandFunc", "executes", "the", "role", "get", "command", "." ]
[ "func", "roleGetCommandFunc", "(", "cmd", "*", "cobra", ".", "Command", ",", "args", "[", "]", "string", ")", "{", "if", "len", "(", "args", ")", "!=", "1", "{", "ExitWithError", "(", "ExitBadArgs", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ")", ...
2,830
all-2831
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "ResumeParams", ")", "UnmarshalJSON", "(", "data", "[", "]", "<mask>", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger24", "(", "&", "r"...
2,831
all-2832
[ "Run", "creates", "a", "new", "Docker", "container", "as", "defined", "by", "current", "image", "and", "container", "template", ".", "Returns", "ExternalCmdError", "or", "UnexpectedOutputError", "on", "error", "." ]
[ "func", "(", "s", "*", "Image", ")", "Run", "(", "cfg", "*", "RunConfig", ")", "(", "*", "Container", ",", "error", ")", "{", "args", ":=", "make", "(", "[", "]", "string", ",", "0", ",", "len", "(", "cfg", ".", "Options", ")", "+", "len", "(...
2,832
all-2833
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "SetPauseOnExceptionsParams", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger8", "(", ...
2,833
all-2834
[ "WithObjectID", "identifier", "of", "the", "object", "to", "call", "function", "on", ".", "Either", "objectId", "or", "executionContextId", "should", "be", "specified", "." ]
[ "func", "(", "p", "CallFunctionOnParams", ")", "WithObjectID", "(", "objectID", "RemoteObjectID", ")", "*", "CallFunctionOnParams", "{", "p", ".", "ObjectID", "=", "objectID", "\n", "<mask>", "&", "p", "\n", "}" ]
2,834
all-2835
[ "This", "validates", "the", "Routes", "and", "prepares", "the", "Trie", "data", "structure", ".", "It", "must", "be", "called", "once", "the", "Routes", "are", "defined", "and", "before", "trying", "to", "find", "Routes", ".", "The", "order", "matters", "i...
[ "func", "(", "rt", "*", "router", ")", "start", "(", ")", "error", "{", "rt", ".", "trie", "=", "trie", ".", "New", "(", ")", "\n", "rt", ".", "index", "=", "map", "[", "*", "<mask>", "]", "int", "{", "}", "\n\n", "for", "i", ",", "route", ...
2,835
all-2836
[ "Do", "executes", "IndexedDB", ".", "clearObjectStore", "against", "the", "provided", "context", "." ]
[ "func", "(", "p", "*", "ClearObjectStoreParams", ")", "Do", "(", "ctx", "<mask>", ".", "Context", ")", "(", "err", "error", ")", "{", "return", "cdp", ".", "Execute", "(", "ctx", ",", "CommandClearObjectStore", ",", "p", ",", "nil", ")", "\n", "}" ]
2,836
all-2837
[ "On", "enables", "maintenance", "." ]
[ "func", "(", "s", "*", "FileStore", ")", "On", "(", ")", "(", "changed", "bool", ",", "err", "error", ")", "{", "if", "_", ",", "err", "=", "os", ".", "Stat", "(", "s", ".", "<mask>", ")", ";", "err", "==", "nil", "{", "return", "\n", "}", ...
2,837
all-2838
[ "ArticleCtx", "middleware", "is", "used", "to", "load", "an", "Article", "object", "from", "the", "URL", "parameters", "passed", "through", "as", "the", "request", ".", "In", "case", "the", "Article", "could", "not", "be", "found", "we", "stop", "here", "a...
[ "func", "ArticleCtx", "(", "next", "http", ".", "Handler", ")", "http", ".", "Handler", "{", "return", "http", ".", "HandlerFunc", "(", "func", "(", "w", "http", ".", "ResponseWriter", ",", "r", "*", "http", ".", "Request", ")", "{", "var", "<mask>", ...
2,838
all-2839
[ "ListenAndServeTLSEmbed", "serves", "HTTPS", "requests", "from", "the", "given", "TCP", "addr", "using", "the", "given", "handler", ".", "certData", "and", "keyData", "must", "contain", "valid", "TLS", "certificate", "and", "key", "data", "." ]
[ "func", "ListenAndServeTLSEmbed", "(", "addr", "string", ",", "certData", ",", "keyData", "[", "]", "byte", ",", "handler", "RequestHandler", ")", "error", "{", "s", ":=", "&", "Server", "{", "<mask>", ":", "handler", ",", "}", "\n", "return", "s", ".", ...
2,839
all-2840
[ "ApplySingleExtract", "applies", "the", "given", "JSON", "selector", "and", "returns", "the", "results", ".", "It", "s", "an", "error", "if", "the", "selector", "yields", "more", "than", "one", "value", "." ]
[ "func", "(", "d", "*", "Displayer", ")", "ApplySingleExtract", "(", "extract", "string", ")", "error", "{", "if", "err", ":=", "d", ".", "ApplyExtract", "(", "extract", ",", "true", ")", ";", "err", "!=", "nil", "{", "return", "err", "\n", "}", "\n",...
2,840
all-2841
[ "Load", "the", "hosts", "file", "into", "l", ".", "Lines", ".", "Load", "()", "is", "called", "by", "NewHosts", "()", "and", "Hosts", ".", "Flush", "()", "so", "you", "generally", "you", "won", "t", "need", "to", "call", "this", "yourself", "." ]
[ "func", "(", "h", "*", "Hosts", ")", "Load", "(", ")", "error", "{", "var", "lines", "[", "]", "HostsLine", "\n\n", "file", ",", "err", ":=", "<mask>", ".", "Open", "(", "h", ".", "Path", ")", "\n", "if", "err", "!=", "nil", "{", "return", "err...
2,841
all-2842
[ "Read", "reads", "the", "next", "merge", "node", "." ]
[ "func", "(", "r", "*", "Reader", ")", "Read", "(", ")", "(", "*", "MergeNode", ",", "error", ")", "{", "_k", ",", "err", ":=", "r", ".", "pbr", ".", "ReadBytes", "(", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n"...
2,842
all-2843
[ "GetData", "retrieves", "the", "Data", "value", "from", "the", "union", "returning", "ok", "if", "the", "union", "s", "switch", "indicated", "the", "value", "is", "valid", "." ]
[ "func", "(", "u", "LedgerEntryData", ")", "GetData", "(", ")", "(", "result", "DataEntry", ",", "ok", "bool", ")", "{", "armName", ",", "_", ":=", "u", ".", "ArmForSwitch", "(", "int32", "(", "u", ".", "Type", ")", ")", "\n\n", "if", "armName", "==...
2,843
all-2844
[ "StartServer", "starts", "a", "remote", "Pact", "Mock", "Server", "." ]
[ "func", "(", "p", "*", "PactClient", ")", "StartServer", "(", "args", "[", "]", "string", ",", "port", "int", ")", "*", "types", ".", "MockServer", "{", "log", ".", "Println", "(", "\"", "\"", ",", "args", ",", "\"", "\"", ",", "port", ")", "\n",...
2,844
all-2845
[ "WIFFromPrivKeyBytes", "returns", "the", "privKeyBytes", "in", "Wallet", "Import", "Format", "." ]
[ "func", "WIFFromPrivKeyBytes", "(", "privKeyBytes", "[", "]", "byte", ",", "compress", "bool", ")", "string", "{", "versionPrefix", ":=", "btcPrefixPrivKey", "// TODO Make const or configurable", "\n", "<mask>", ":=", "append", "(", "[", "]", "byte", "{", "version...
2,845
all-2846
[ "WithContext", "adds", "the", "context", "to", "the", "get", "apps", "app", "routes", "route", "params" ]
[ "func", "(", "o", "*", "GetAppsAppRoutesRouteParams", ")", "WithContext", "(", "ctx", "context", ".", "<mask>", ")", "*", "GetAppsAppRoutesRouteParams", "{", "o", ".", "SetContext", "(", "ctx", ")", "\n", "return", "o", "\n", "}" ]
2,846
all-2847
[ "retrieve", "information", "about", "attachments", "of", "a", "bound", "framebuffer", "object" ]
[ "func", "GetFramebufferAttachmentParameteriv", "(", "target", "uint32", ",", "attachment", "uint32", ",", "pname", "uint32", ",", "params", "*", "int32", ")", "{", "C", ".", "glowGetFramebufferAttachmentParameteriv", "(", "gpGetFramebufferAttachmentParameteriv", ",", "(...
2,847
all-2848
[ "UnmarshalJSON", "overrides", "the", "logic", "for", "parsing", "the", "JSON", "-", "encoded", "container", "health", "data" ]
[ "func", "(", "healthStatus", "*", "ContainerHealthStatus", ")", "UnmarshalJSON", "(", "b", "[", "]", "byte", ")", "error", "{", "*", "healthStatus", "=", "ContainerHealthUnknown", "\n\n", "if", "strings", ".", "ToLower", "(", "string", "(", "b", ")", ")", ...
2,848
all-2849
[ "typeof", "returns", "the", "type", "of", "the", "given", "name", "which", "may", "be", "of", "the", "form", "x", "or", "p", ".", "X", "." ]
[ "func", "(", "cfg", "*", "TypeConfig", ")", "typeof", "(", "<mask>", "string", ")", "string", "{", "if", "cfg", ".", "Var", "!=", "nil", "{", "if", "t", ":=", "cfg", ".", "Var", "[", "name", "]", ";", "t", "!=", "\"", "\"", "{", "return", "t", ...
2,849
all-2850
[ "AddHeader", "adds", "a", "single", "application", "header", "to", "the", "Context", "." ]
[ "func", "(", "cb", "*", "ContextBuilder", ")", "AddHeader", "(", "key", ",", "value", "string", ")", "*", "ContextBuilder", "{", "if", "cb", ".", "Headers", "==", "nil", "{", "cb", ".", "Headers", "=", "map", "[", "string", "]", "string", "{", "key",...
2,850
all-2851
[ "NextPos", "returns", "the", "tile", "s", "next", "position", ".", "NextPos", "is", "used", "only", "at", "testing", "so", "far", "." ]
[ "func", "(", "t", "*", "Tile", ")", "NextPos", "(", ")", "(", "int", ",", "int", ")", "{", "return", "t", ".", "next", ".", "x", ",", "t", ".", "<mask>", ".", "y", "\n", "}" ]
2,851
all-2852
[ "HasName", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "a", "*", "Alert", ")", "HasName", "(", ")", "bool", "{", "if", "a", "!=", "nil", "&&", "a", ".", "Name", "!=", "nil", "{", "return", "<mask>", "\n", "}", "\n\n", "return", "false", "\n", "}" ]
2,852
all-2853
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "Rule", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "<mask>", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss25", "(", "&", "r", ",", "v...
2,853
all-2854
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "GetFrameOwnerReturns", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "<mask>", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom40", "(", "&", "w", ",", "v", ")",...
2,854
all-2855
[ "Mksig", "creates", "a", "byte", "slice", "of", "length", "2", "*", "keyLen", "copying", "the", "bytes", "from", "r", "and", "s", "into", "the", "slice", "left", "padding", "r", "and", "s", "to", "keyLen", "." ]
[ "func", "(", "es", "*", "EccSigner", ")", "Mksig", "(", "r", ",", "s", "*", "big", ".", "Int", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "var", "n", "int", "\n\n", "buf", ":=", "make", "(", "[", "]", "byte", ",", "2", "*", "<mask>...
2,855
all-2856
[ "NewContainerResponse", "creates", "ContainerResponse", "for", "a", "container", "." ]
[ "func", "NewContainerResponse", "(", "dockerContainer", "*", "apicontainer", ".", "DockerContainer", ",", "eni", "*", "apieni", ".", "ENI", ")", "ContainerResponse", "{", "<mask>", ":=", "dockerContainer", ".", "Container", "\n", "resp", ":=", "ContainerResponse", ...
2,856
all-2857
[ "TerminalFormat", "formats", "log", "records", "optimized", "for", "human", "readability", "on", "a", "terminal", "with", "color", "-", "coded", "level", "output", "and", "terser", "human", "friendly", "timestamp", ".", "This", "format", "should", "only", "be", ...
[ "func", "TerminalFormat", "(", ")", "Format", "{", "return", "FormatFunc", "(", "func", "(", "r", "*", "Record", ")", "[", "]", "byte", "{", "var", "color", "=", "0", "\n", "switch", "r", ".", "Lvl", "{", "case", "LvlCrit", ":", "color", "=", "35",...
2,857
all-2858
[ "reconcile", "ensures", "a", "knative", "-", "build", "prowjob", "has", "a", "corresponding", "build", "updating", "the", "prowjob", "s", "status", "as", "the", "build", "progresses", "." ]
[ "func", "reconcile", "(", "c", "reconciler", ",", "key", "string", ")", "error", "{", "ctx", ",", "namespace", ",", "name", ",", "err", ":=", "fromKey", "(", "key", ")", "\n", "if", "err", "!=", "nil", "{", "runtime", ".", "HandleError", "(", "err", ...
2,858
all-2859
[ "GetUUID", "returns", "the", "app", "v4", "UUID", ".", "An", "UUID", "will", "be", "generated", "if", "it", "does", "not", "exist", "." ]
[ "func", "(", "app", "*", "App", ")", "GetUUID", "(", ")", "(", "string", ",", "error", ")", "{", "if", "app", ".", "UUID", "!=", "\"", "\"", "{", "return", "app", ".", "UUID", ",", "nil", "\n", "}", "\n", "uuidV4", ",", "err", ":=", "uuid", "...
2,859
all-2860
[ "GetMessage", "returns", "the", "Message", "field", "if", "non", "-", "nil", "zero", "value", "otherwise", "." ]
[ "func", "(", "c", "*", "Check", ")", "GetMessage", "(", ")", "string", "{", "if", "c", "==", "nil", "||", "c", ".", "Message", "==", "nil", "{", "return", "\"", "\"", "\n", "}", "\n", "return", "*", "c", ".", "<mask>", "\n", "}" ]
2,860
all-2861
[ "Pos", "returns", "the", "tile", "s", "current", "position", ".", "Pos", "is", "used", "only", "at", "testing", "so", "far", "." ]
[ "func", "(", "t", "*", "Tile", ")", "Pos", "(", ")", "(", "int", ",", "int", ")", "{", "return", "t", ".", "current", ".", "x", ",", "t", ".", "<mask>", ".", "y", "\n", "}" ]
2,861
all-2862
[ "CreateEtcdClient", "creates", "a", "client", "from", "member", "." ]
[ "func", "(", "m", "*", "Member", ")", "CreateEtcdClient", "(", "opts", "...", "grpc", ".", "DialOption", ")", "(", "*", "clientv3", ".", "<mask>", ",", "error", ")", "{", "cfg", ",", "err", ":=", "m", ".", "CreateEtcdClientConfig", "(", "opts", "...", ...
2,862
all-2863
[ "newGossipChannel", "returns", "a", "named", "usable", "channel", ".", "It", "delegates", "receiving", "duties", "to", "the", "passed", "Gossiper", "." ]
[ "func", "newGossipChannel", "(", "channelName", "string", ",", "ourself", "*", "localPeer", ",", "r", "*", "routes", ",", "g", "Gossiper", ",", "logger", "Logger", ")", "*", "gossipChannel", "{", "return", "&", "gossipChannel", "{", "<mask>", ":", "channelNa...
2,863
all-2864
[ "GetConnectionInfo", "returns", "the", "basic", "connection", "information", "used", "to", "interact", "with", "the", "server" ]
[ "func", "(", "r", "*", "ProtocolLXD", ")", "GetConnectionInfo", "(", ")", "(", "*", "ConnectionInfo", ",", "error", ")", "{", "info", ":=", "ConnectionInfo", "{", "}", "\n", "info", ".", "Certificate", "=", "r", ".", "httpCertificate", "\n", "info", ".",...
2,864
all-2865
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "EventResetProfiles", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "Writer", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler15", "(", "&", "w", ",", "v",...
2,865
all-2866
[ "LogFields", "belongs", "to", "the", "Span", "interface" ]
[ "func", "(", "s", "*", "MockSpan", ")", "LogFields", "(", "<mask>", "...", "log", ".", "Field", ")", "{", "s", ".", "logFieldsWithTimestamp", "(", "time", ".", "Now", "(", ")", ",", "fields", "...", ")", "\n", "}" ]
2,866
all-2867
[ "getClient", "returns", "a", "client", "specified", "by", "the", "docker", "version", ".", "It", "s", "wrapped", "by", "GetClient", "so", "that", "it", "can", "do", "platform", "-", "specific", "magic", "." ]
[ "func", "(", "f", "*", "factory", ")", "getClient", "(", "version", "dockerclient", ".", "DockerVersion", ")", "(", "sdkclient", ".", "Client", ",", "error", ")", "{", "<mask>", ",", "ok", ":=", "f", ".", "clients", "[", "version", "]", "\n", "if", "...
2,867
all-2868
[ "SaveMultipartFile", "saves", "multipart", "file", "fh", "under", "the", "given", "filename", "path", "." ]
[ "func", "SaveMultipartFile", "(", "fh", "*", "multipart", ".", "FileHeader", ",", "path", "string", ")", "error", "{", "f", ",", "err", ":=", "fh", ".", "Open", "(", ")", "\n", "if", "err", "!=", "nil", "{", "return", "err", "\n", "}", "\n\n", "if"...
2,868
all-2869
[ "MatchesDigest", "returns", "true", "iff", "the", "manifest", "matches", "expectedDigest", ".", "Error", "may", "be", "set", "if", "this", "returns", "false", ".", "Note", "that", "this", "is", "not", "doing", "ConstantTimeCompare", ";", "by", "the", "time", ...
[ "func", "MatchesDigest", "(", "manifest", "[", "]", "byte", ",", "expectedDigest", "digest", ".", "Digest", ")", "(", "bool", ",", "error", ")", "{", "// This should eventually support various digest types.", "actualDigest", ",", "err", ":=", "Digest", "(", "manif...
2,869
all-2870
[ "Get", "returns", "a", "Media", "struct", "representing", "a", "Media", "instance", "or", "an", "error", "." ]
[ "func", "(", "m", "*", "MediaService", ")", "Get", "(", "ctx", "context", ".", "Context", ",", "messageSid", "string", ",", "sid", "string", ")", "(", "*", "Media", ",", "error", ")", "{", "<mask>", ":=", "new", "(", "Media", ")", "\n", "err", ":="...
2,870
all-2871
[ "title", ":", "router", "list", "path", ":", "/", "routers", "method", ":", "GET", "produce", ":", "application", "/", "json", "responses", ":", "200", ":", "OK", "204", ":", "No", "content" ]
[ "func", "listRouters", "(", "w", "<mask>", ".", "ResponseWriter", ",", "r", "*", "http", ".", "Request", ",", "t", "auth", ".", "Token", ")", "error", "{", "contexts", ":=", "permission", ".", "ContextsForPermission", "(", "t", ",", "permission", ".", "P...
2,871
all-2872
[ "SetSelected", "makes", "the", "button", "selected", ".", "One", "should", "not", "use", "the", "method", "directly", "it", "is", "for", "RadioGroup", "control" ]
[ "func", "(", "c", "*", "Radio", ")", "SetSelected", "(", "val", "bool", ")", "{", "c", ".", "selected", "=", "val", "\n\n", "if", "c", ".", "onChange", "!=", "nil", "{", "<mask>", "c", ".", "onChange", "(", "val", ")", "\n", "}", "\n", "}" ]
2,872
all-2873
[ "RBACServer", "returns", "all", "the", "Candid", "settings", "needed", "to", "connect", "to", "a", "server", "." ]
[ "func", "(", "c", "*", "Config", ")", "RBACServer", "(", ")", "(", "string", ",", "string", ",", "int64", ",", "string", ",", "string", ",", "<mask>", ",", "string", ")", "{", "return", "c", ".", "m", ".", "GetString", "(", "\"", "\"", ")", ",", ...
2,873
all-2874
[ "UploadURL", "creates", "an", "upload", "URL", "for", "the", "form", "that", "the", "user", "will", "fill", "out", "passing", "the", "application", "path", "to", "load", "when", "the", "POST", "of", "the", "form", "is", "completed", ".", "These", "URLs", ...
[ "func", "UploadURL", "(", "c", "context", ".", "Context", ",", "successPath", "string", ",", "opts", "*", "UploadURLOptions", ")", "(", "*", "url", ".", "URL", ",", "error", ")", "{", "req", ":=", "&", "blobpb", ".", "CreateUploadURLRequest", "{", "Succe...
2,874
all-2875
[ "Remove", "function", "remove", "the", "node", "." ]
[ "func", "(", "n", "*", "node", ")", "Remove", "(", "dir", ",", "recursive", "bool", ",", "callback", "func", "(", "path", "string", ")", ")", "*", "v2error", ".", "Error", "{", "if", "!", "n", ".", "IsDir", "(", ")", "{", "// key-value pair", "_", ...
2,875
all-2876
[ "NewPool", "creates", "and", "returns", "a", "new", "pool", "." ]
[ "func", "NewPool", "(", ")", "*", "Pool", "{", "return", "&", "Pool", "{", "tasks", ":", "make", "(", "map", "[", "string", "]", "*", "Task", ")", ",", "queues", ":", "<mask>", "(", "map", "[", "*", "Queue", "]", "bool", ")", ",", "closed", ":"...
2,876
all-2877
[ "Middleware", "registers", "middleware", "to", "handle", "incoming", "request", "messages", "." ]
[ "func", "(", "s", "*", "Server", ")", "Middleware", "(", "middleware", "...", "Middleware", ")", "{", "for", "_", ",", "m", ":=", "<mask>", "middleware", "{", "s", ".", "MiddlewareFunc", "(", "m", ".", "Middleware", ")", "\n", "}", "\n", "}" ]
2,877
all-2878
[ "DeleteImage", "deletes", "the", "named", "image", "from", "the", "registry", "if", "supported", "." ]
[ "func", "(", "ref", "dockerReference", ")", "DeleteImage", "(", "ctx", "<mask>", ".", "Context", ",", "sys", "*", "types", ".", "SystemContext", ")", "error", "{", "return", "deleteImage", "(", "ctx", ",", "sys", ",", "ref", ")", "\n", "}" ]
2,878
all-2879
[ "ImageID", "computes", "an", "ID", "which", "can", "uniquely", "identify", "this", "image", "by", "its", "contents", "." ]
[ "func", "(", "m", "*", "Schema2", ")", "ImageID", "(", "[", "]", "digest", ".", "Digest", ")", "(", "string", ",", "error", ")", "{", "if", "err", ":=", "m", ".", "ConfigDescriptor", ".", "Digest", ".", "Validate", "(", ")", ";", "err", "!=", "ni...
2,879
all-2880
[ "SetHealthStatus", "sets", "the", "container", "health", "status" ]
[ "func", "(", "c", "*", "Container", ")", "SetHealthStatus", "(", "health", "HealthStatus", ")", "{", "c", ".", "lock", ".", "Lock", "(", ")", "\n", "defer", "c", ".", "lock", ".", "Unlock", "(", ")", "\n\n", "if", "c", ".", "Health", ".", "<mask>",...
2,880
all-2881
[ "NewDiskCache", "creates", "a", "GitHub", "cache", "RoundTripper", "that", "is", "backed", "by", "a", "disk", "cache", "." ]
[ "func", "NewDiskCache", "(", "delegate", "http", ".", "RoundTripper", ",", "cacheDir", "string", ",", "cacheSizeGB", ",", "maxConcurrency", "int", ")", "http", ".", "RoundTripper", "{", "return", "NewFromCache", "(", "delegate", ",", "diskcache", ".", "NewWithDi...
2,881
all-2882
[ "GetHideZeroCountsOk", "returns", "a", "tuple", "with", "the", "HideZeroCounts", "field", "if", "it", "s", "non", "-", "nil", "zero", "value", "otherwise", "and", "a", "boolean", "to", "check", "if", "the", "value", "has", "been", "set", "." ]
[ "func", "(", "w", "*", "Widget", ")", "GetHideZeroCountsOk", "(", ")", "(", "bool", ",", "bool", ")", "{", "if", "w", "==", "nil", "||", "w", ".", "HideZeroCounts", "==", "nil", "{", "return", "false", ",", "<mask>", "\n", "}", "\n", "return", "*",...
2,882
all-2883
[ "Incoming", "message", "gathering", "routine" ]
[ "func", "(", "bot", "*", "Bot", ")", "handleIncomingMessages", "(", ")", "{", "scan", ":=", "bufio", ".", "NewScanner", "(", "bot", ".", "con", ")", "\n", "for", "scan", ".", "Scan", "(", ")", "{", "// Disconnect if we have seen absolutely nothing for 300 seco...
2,883
all-2884
[ "Do", "executes", "Accessibility", ".", "getFullAXTree", "against", "the", "provided", "context", ".", "returns", ":", "nodes" ]
[ "func", "(", "p", "*", "GetFullAXTreeParams", ")", "Do", "(", "ctx", "context", ".", "Context", ")", "(", "nodes", "[", "]", "*", "Node", ",", "err", "error", ")", "{", "// execute", "var", "res", "GetFullAXTreeReturns", "\n", "err", "=", "cdp", ".", ...
2,884
all-2885
[ "AddressToAccountId", "converts", "the", "provided", "address", "into", "a", "xdr", ".", "AccountId" ]
[ "func", "AddressToAccountId", "(", "address", "string", ")", "(", "result", "xdr", ".", "AccountId", ",", "err", "error", ")", "{", "bytes", ",", "err", ":=", "strkey", ".", "Decode", "(", "strkey", ".", "VersionByteAccountID", ",", "address", ")", "\n\n",...
2,885
all-2886
[ "Get", "reads", "the", "path", "s", "content", "from", "your", "local", "filesystem", "." ]
[ "func", "(", "l", "ChrootLoader", ")", "Get", "(", "path", "string", ")", "(", "io", ".", "Reader", ",", "error", ")", "{", "// Get the full path", "<mask>", ",", "err", ":=", "filepath", ".", "EvalSymlinks", "(", "path", ")", "\n", "if", "err", "!=", ...
2,886
all-2887
[ "Do", "executes", "Page", ".", "createIsolatedWorld", "against", "the", "provided", "context", ".", "returns", ":", "executionContextID", "-", "Execution", "context", "of", "the", "isolated", "world", "." ]
[ "func", "(", "p", "*", "CreateIsolatedWorldParams", ")", "Do", "(", "ctx", "context", ".", "Context", ")", "(", "executionContextID", "runtime", ".", "ExecutionContextID", ",", "err", "error", ")", "{", "// execute", "var", "<mask>", "CreateIsolatedWorldReturns", ...
2,887
all-2888
[ "Destroy", "destroys", "a", "ZFS", "dataset", ".", "If", "the", "destroy", "bit", "flag", "is", "set", "any", "descendents", "of", "the", "dataset", "will", "be", "recursively", "destroyed", "including", "snapshots", ".", "If", "the", "deferred", "bit", "fla...
[ "func", "(", "d", "*", "Dataset", ")", "Destroy", "(", "flags", "DestroyFlag", ")", "error", "{", "args", ":=", "make", "(", "[", "]", "string", ",", "1", ",", "3", ")", "\n", "args", "[", "0", "]", "=", "\"", "\"", "\n", "if", "flags", "&", ...
2,888
all-2889
[ "TouchPosition", "returns", "the", "position", "for", "the", "touch", "of", "the", "specified", "ID", ".", "If", "the", "touch", "of", "the", "specified", "ID", "is", "not", "present", "TouchPosition", "returns", "(", "0", "0", ")", ".", "TouchPosition", "...
[ "func", "TouchPosition", "(", "id", "int", ")", "(", "int", ",", "int", ")", "{", "found", ":=", "false", "\n", "for", "_", ",", "i", ":=", "range", "uiDriver", "(", ")", ".", "Input", "(", ")", ".", "TouchIDs", "(", ")", "{", "if", "id", "==",...
2,889
all-2890
[ "PrependPageMenu", "()", "is", "a", "wrapper", "around", "gtk_notebook_prepend_page_menu", "()", "." ]
[ "func", "(", "v", "*", "Notebook", ")", "PrependPageMenu", "(", "child", "IWidget", ",", "tabLabel", "IWidget", ",", "menuLabel", "IWidget", ")", "int", "{", "c", ":=", "C", ".", "gtk_notebook_prepend_page_menu", "(", "v", ".", "native", "(", ")", ",", "...
2,890
all-2891
[ "GenPresto", "generates", "a", "Presto", "DSN", "from", "the", "passed", "URL", "." ]
[ "func", "GenPresto", "(", "u", "*", "URL", ")", "(", "string", ",", "error", ")", "{", "z", ":=", "&", "url", ".", "URL", "{", "Scheme", ":", "\"", "\"", ",", "Opaque", ":", "u", ".", "Opaque", ",", "User", ":", "u", ".", "User", ",", "Host",...
2,891
all-2892
[ "UpdateStoragePoolVolumeSnapshot", "updates", "the", "volume", "to", "match", "the", "provided", "StoragePoolVolume", "struct" ]
[ "func", "(", "r", "*", "ProtocolLXD", ")", "UpdateStoragePoolVolumeSnapshot", "(", "pool", "string", ",", "volumeType", "string", ",", "volumeName", "string", ",", "snapshotName", "string", ",", "volume", "api", ".", "StorageVolumeSnapshotPut", ",", "ETag", "strin...
2,892
all-2893
[ "GetExchangeRates", "gets", "the", "current", "exchange", "rates" ]
[ "func", "(", "c", "Client", ")", "GetExchangeRates", "(", ")", "(", "map", "[", "string", "]", "string", ",", "error", ")", "{", "holder", ":=", "<mask>", "[", "string", "]", "string", "{", "}", "\n", "if", "err", ":=", "c", ".", "Get", "(", "\""...
2,893
all-2894
[ "Monitor", "indicates", "an", "expected", "call", "of", "Monitor" ]
[ "func", "(", "mr", "*", "MockUdevMockRecorder", ")", "Monitor", "(", "arg0", "<mask>", "{", "}", ")", "*", "gomock", ".", "Call", "{", "return", "mr", ".", "mock", ".", "ctrl", ".", "RecordCallWithMethodType", "(", "mr", ".", "mock", ",", "\"", "\"", ...
2,894
all-2895
[ "SettingsNewWithPath", "is", "a", "wrapper", "around", "g_settings_new_with_path", "()", "." ]
[ "func", "SettingsNewWithPath", "(", "schemaID", ",", "<mask>", "string", ")", "*", "Settings", "{", "cstr1", ":=", "(", "*", "C", ".", "gchar", ")", "(", "C", ".", "CString", "(", "schemaID", ")", ")", "\n", "defer", "C", ".", "free", "(", "unsafe", ...
2,895
all-2896
[ "Let", "s", "say", "we", "want", "to", "send", "the", "a", "container", "a", "including", "snapshots", "snap0", "and", "snap1", "on", "storage", "pool", "pool1", "from", "LXD", "l1", "to", "LXD", "l2", "on", "storage", "pool", "pool2", ":", "The", "poo...
[ "func", "(", "s", "*", "rbdMigrationSourceDriver", ")", "rbdSend", "(", "conn", "*", "websocket", ".", "Conn", ",", "volumeName", "string", ",", "volumeParentName", "string", ",", "readWrapper", "func", "(", "io", ".", "ReadCloser", ")", "io", ".", "ReadClos...
2,896
all-2897
[ "Log", "adds", "a", "new", "log", "message", "with", "a", "given", "severity", "level", "." ]
[ "func", "(", "l", "*", "LoggerBase", ")", "Log", "(", "lvl", "Level", ",", "msg", "string", ")", "{", "lvln", ",", "ok", ":=", "levelNums", "[", "lvl", "]", "\n", "if", "!", "ok", "{", "panic", "(", "\"", "\"", ")", "\n", "}", "\n\n", "if", "...
2,897
all-2898
[ "Upsert", "finds", "a", "single", "document", "matching", "the", "provided", "selector", "document", "and", "modifies", "it", "according", "to", "the", "update", "document", ".", "If", "no", "document", "matching", "the", "selector", "is", "found", "the", "upd...
[ "func", "(", "c", "*", "<mask>", ")", "Upsert", "(", "selector", "interface", "{", "}", ",", "update", "interface", "{", "}", ")", "(", "info", "*", "ChangeInfo", ",", "err", "error", ")", "{", "lerr", ",", "err", ":=", "c", ".", "writeQuery", "(",...
2,898
all-2899
[ "UnmarshalEasyJSON", "satisfies", "easyjson", ".", "Unmarshaler", "." ]
[ "func", "(", "t", "*", "KeyPathType", ")", "UnmarshalEasyJSON", "(", "in", "*", "jlexer", ".", "Lexer", ")", "{", "switch", "KeyPathType", "(", "in", ".", "String", "(", ")", ")", "{", "case", "KeyPathTypeNull", ":", "*", "t", "=", "KeyPathTypeNull", "...
2,899
all-2900
[ "tagByName", "locates", "a", "tag", "by", "it", "supplied", "name", "and", "category", "ID", ".", "Use", "tagCategoryByName", "to", "get", "the", "tag", "category", "ID", "if", "require", "the", "category", "ID", "as", "well", "." ]
[ "func", "tagByName", "(", "client", "*", "tags", ".", "RestClient", ",", "name", ",", "categoryID", "string", ")", "(", "string", ",", "error", ")", "{", "ctx", ",", "cancel", ":=", "context", ".", "WithTimeout", "(", "context", ".", "Background", "(", ...