id int32 0 167k | repo stringlengths 5 54 | path stringlengths 4 155 | func_name stringlengths 1 118 | original_string stringlengths 52 85.5k | language stringclasses 1
value | code stringlengths 52 85.5k | code_tokens list | docstring stringlengths 6 2.61k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 85 252 |
|---|---|---|---|---|---|---|---|---|---|---|---|
152,800 | lestrrat/go-slack | users_gen.go | SetActive | func (s *UsersService) SetActive() *UsersSetActiveCall {
var call UsersSetActiveCall
call.service = s
return &call
} | go | func (s *UsersService) SetActive() *UsersSetActiveCall {
var call UsersSetActiveCall
call.service = s
return &call
} | [
"func",
"(",
"s",
"*",
"UsersService",
")",
"SetActive",
"(",
")",
"*",
"UsersSetActiveCall",
"{",
"var",
"call",
"UsersSetActiveCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"return",
"&",
"call",
"\n",
"}"
] | // SetActive creates a UsersSetActiveCall object in preparation for accessing the users.setActive endpoint | [
"SetActive",
"creates",
"a",
"UsersSetActiveCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"users",
".",
"setActive",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/users_gen.go#L398-L402 |
152,801 | lestrrat/go-slack | users_gen.go | SetPresence | func (s *UsersService) SetPresence(presence string) *UsersSetPresenceCall {
var call UsersSetPresenceCall
call.service = s
call.presence = presence
return &call
} | go | func (s *UsersService) SetPresence(presence string) *UsersSetPresenceCall {
var call UsersSetPresenceCall
call.service = s
call.presence = presence
return &call
} | [
"func",
"(",
"s",
"*",
"UsersService",
")",
"SetPresence",
"(",
"presence",
"string",
")",
"*",
"UsersSetPresenceCall",
"{",
"var",
"call",
"UsersSetPresenceCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"presence",
"=",
"presence",
"\n",
... | // SetPresence creates a UsersSetPresenceCall object in preparation for accessing the users.setPresence endpoint | [
"SetPresence",
"creates",
"a",
"UsersSetPresenceCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"users",
".",
"setPresence",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/users_gen.go#L447-L452 |
152,802 | lestrrat/go-slack | users_gen.go | ValidateArgs | func (c *UsersSetPresenceCall) ValidateArgs() error {
if len(c.presence) <= 0 {
return errors.New(`required field presence not initialized`)
}
return nil
} | go | func (c *UsersSetPresenceCall) ValidateArgs() error {
if len(c.presence) <= 0 {
return errors.New(`required field presence not initialized`)
}
return nil
} | [
"func",
"(",
"c",
"*",
"UsersSetPresenceCall",
")",
"ValidateArgs",
"(",
")",
"error",
"{",
"if",
"len",
"(",
"c",
".",
"presence",
")",
"<=",
"0",
"{",
"return",
"errors",
".",
"New",
"(",
"`required field presence not initialized`",
")",
"\n",
"}",
"\n",... | // ValidateArgs checks that all required fields are set in the UsersSetPresenceCall object | [
"ValidateArgs",
"checks",
"that",
"all",
"required",
"fields",
"are",
"set",
"in",
"the",
"UsersSetPresenceCall",
"object"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/users_gen.go#L455-L460 |
152,803 | taskcluster/jsonschema2go | text/text.go | Indent | func Indent(text, indent string) string {
if text == "" {
return text
}
if text[len(text)-1:] == "\n" {
result := ""
for _, j := range strings.Split(text[:len(text)-1], "\n") {
result += indent + j + "\n"
}
return result
}
result := ""
for _, j := range strings.Split(strings.TrimRight(text, "\n"), "\n") {
result += indent + j + "\n"
}
return result[:len(result)-1]
} | go | func Indent(text, indent string) string {
if text == "" {
return text
}
if text[len(text)-1:] == "\n" {
result := ""
for _, j := range strings.Split(text[:len(text)-1], "\n") {
result += indent + j + "\n"
}
return result
}
result := ""
for _, j := range strings.Split(strings.TrimRight(text, "\n"), "\n") {
result += indent + j + "\n"
}
return result[:len(result)-1]
} | [
"func",
"Indent",
"(",
"text",
",",
"indent",
"string",
")",
"string",
"{",
"if",
"text",
"==",
"\"",
"\"",
"{",
"return",
"text",
"\n",
"}",
"\n",
"if",
"text",
"[",
"len",
"(",
"text",
")",
"-",
"1",
":",
"]",
"==",
"\"",
"\\n",
"\"",
"{",
... | // Indent indents a block of text with an indent string. It does this by
// placing the given indent string at the front of every line, except on the
// last line, if the last line has no characters. This special treatment
// simplifies the generation of nested text structures. | [
"Indent",
"indents",
"a",
"block",
"of",
"text",
"with",
"an",
"indent",
"string",
".",
"It",
"does",
"this",
"by",
"placing",
"the",
"given",
"indent",
"string",
"at",
"the",
"front",
"of",
"every",
"line",
"except",
"on",
"the",
"last",
"line",
"if",
... | 0757acc540d0725f2d78c22e434b7c295f247d8e | https://github.com/taskcluster/jsonschema2go/blob/0757acc540d0725f2d78c22e434b7c295f247d8e/text/text.go#L87-L103 |
152,804 | taskcluster/jsonschema2go | text/text.go | Underline | func Underline(text string) string {
var maxlen int
for _, j := range strings.Split(text, "\n") {
if len(j) > maxlen {
maxlen = len(j)
}
}
return text + "\n" + strings.Repeat("=", maxlen) + "\n"
} | go | func Underline(text string) string {
var maxlen int
for _, j := range strings.Split(text, "\n") {
if len(j) > maxlen {
maxlen = len(j)
}
}
return text + "\n" + strings.Repeat("=", maxlen) + "\n"
} | [
"func",
"Underline",
"(",
"text",
"string",
")",
"string",
"{",
"var",
"maxlen",
"int",
"\n",
"for",
"_",
",",
"j",
":=",
"range",
"strings",
".",
"Split",
"(",
"text",
",",
"\"",
"\\n",
"\"",
")",
"{",
"if",
"len",
"(",
"j",
")",
">",
"maxlen",
... | // Underline returns the provided text together with a new line character and a
// line of "=" characters whose length is equal to the maximum line length in
// the provided text, followed by a final newline character. | [
"Underline",
"returns",
"the",
"provided",
"text",
"together",
"with",
"a",
"new",
"line",
"character",
"and",
"a",
"line",
"of",
"=",
"characters",
"whose",
"length",
"is",
"equal",
"to",
"the",
"maximum",
"line",
"length",
"in",
"the",
"provided",
"text",
... | 0757acc540d0725f2d78c22e434b7c295f247d8e | https://github.com/taskcluster/jsonschema2go/blob/0757acc540d0725f2d78c22e434b7c295f247d8e/text/text.go#L108-L116 |
152,805 | lestrrat/go-slack | bots_gen.go | Info | func (s *BotsService) Info(bot string) *BotsInfoCall {
var call BotsInfoCall
call.service = s
call.bot = bot
return &call
} | go | func (s *BotsService) Info(bot string) *BotsInfoCall {
var call BotsInfoCall
call.service = s
call.bot = bot
return &call
} | [
"func",
"(",
"s",
"*",
"BotsService",
")",
"Info",
"(",
"bot",
"string",
")",
"*",
"BotsInfoCall",
"{",
"var",
"call",
"BotsInfoCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"bot",
"=",
"bot",
"\n",
"return",
"&",
"call",
"\n",
... | // Info creates a BotsInfoCall object in preparation for accessing the bots.info endpoint | [
"Info",
"creates",
"a",
"BotsInfoCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"bots",
".",
"info",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/bots_gen.go#L26-L31 |
152,806 | lestrrat/go-slack | bots_gen.go | ValidateArgs | func (c *BotsInfoCall) ValidateArgs() error {
if len(c.bot) <= 0 {
return errors.New(`required field bot not initialized`)
}
return nil
} | go | func (c *BotsInfoCall) ValidateArgs() error {
if len(c.bot) <= 0 {
return errors.New(`required field bot not initialized`)
}
return nil
} | [
"func",
"(",
"c",
"*",
"BotsInfoCall",
")",
"ValidateArgs",
"(",
")",
"error",
"{",
"if",
"len",
"(",
"c",
".",
"bot",
")",
"<=",
"0",
"{",
"return",
"errors",
".",
"New",
"(",
"`required field bot not initialized`",
")",
"\n",
"}",
"\n",
"return",
"ni... | // ValidateArgs checks that all required fields are set in the BotsInfoCall object | [
"ValidateArgs",
"checks",
"that",
"all",
"required",
"fields",
"are",
"set",
"in",
"the",
"BotsInfoCall",
"object"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/bots_gen.go#L34-L39 |
152,807 | lestrrat/go-slack | server/mockserver/mockserver.go | HandleChannelsLeave | func (h *Handler) HandleChannelsLeave(w http.ResponseWriter, r *http.Request) {
if err := r.ParseForm(); err != nil {
http.Error(w, http.StatusText(http.StatusBadRequest), http.StatusBadRequest)
return
}
if !h.validateToken(r) {
http.Error(w, http.StatusText(http.StatusForbidden), http.StatusForbidden)
return
}
var c slack.ChannelsLeaveCall
if err := c.FromValues(r.Form); err != nil {
http.Error(w, http.StatusText(http.StatusBadRequest), http.StatusBadRequest)
return
}
var buf bytes.Buffer
if err := json.NewEncoder(&buf).Encode(StockResponse("channels.leave")); err != nil {
http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
return
}
w.Header().Set(`Content-Type`, `application/json; charset=utf-8`)
w.WriteHeader(http.StatusOK)
buf.WriteTo(w)
} | go | func (h *Handler) HandleChannelsLeave(w http.ResponseWriter, r *http.Request) {
if err := r.ParseForm(); err != nil {
http.Error(w, http.StatusText(http.StatusBadRequest), http.StatusBadRequest)
return
}
if !h.validateToken(r) {
http.Error(w, http.StatusText(http.StatusForbidden), http.StatusForbidden)
return
}
var c slack.ChannelsLeaveCall
if err := c.FromValues(r.Form); err != nil {
http.Error(w, http.StatusText(http.StatusBadRequest), http.StatusBadRequest)
return
}
var buf bytes.Buffer
if err := json.NewEncoder(&buf).Encode(StockResponse("channels.leave")); err != nil {
http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
return
}
w.Header().Set(`Content-Type`, `application/json; charset=utf-8`)
w.WriteHeader(http.StatusOK)
buf.WriteTo(w)
} | [
"func",
"(",
"h",
"*",
"Handler",
")",
"HandleChannelsLeave",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
")",
"{",
"if",
"err",
":=",
"r",
".",
"ParseForm",
"(",
")",
";",
"err",
"!=",
"nil",
"{",
"http",
".",
... | // HandleChannelsLeave is the default handler method for the Slack channels.leave API | [
"HandleChannelsLeave",
"is",
"the",
"default",
"handler",
"method",
"for",
"the",
"Slack",
"channels",
".",
"leave",
"API"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/server/mockserver/mockserver.go#L407-L429 |
152,808 | lestrrat/go-slack | usergroups_gen.go | Create | func (s *UsergroupsService) Create(name string) *UsergroupsCreateCall {
var call UsergroupsCreateCall
call.service = s
call.name = name
return &call
} | go | func (s *UsergroupsService) Create(name string) *UsergroupsCreateCall {
var call UsergroupsCreateCall
call.service = s
call.name = name
return &call
} | [
"func",
"(",
"s",
"*",
"UsergroupsService",
")",
"Create",
"(",
"name",
"string",
")",
"*",
"UsergroupsCreateCall",
"{",
"var",
"call",
"UsergroupsCreateCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"name",
"=",
"name",
"\n",
"return",
... | // Create creates a UsergroupsCreateCall object in preparation for accessing the usergroups.create endpoint | [
"Create",
"creates",
"a",
"UsergroupsCreateCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"usergroups",
".",
"create",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/usergroups_gen.go#L63-L68 |
152,809 | lestrrat/go-slack | usergroups_gen.go | Disable | func (s *UsergroupsService) Disable(usergroup string) *UsergroupsDisableCall {
var call UsergroupsDisableCall
call.service = s
call.usergroup = usergroup
return &call
} | go | func (s *UsergroupsService) Disable(usergroup string) *UsergroupsDisableCall {
var call UsergroupsDisableCall
call.service = s
call.usergroup = usergroup
return &call
} | [
"func",
"(",
"s",
"*",
"UsergroupsService",
")",
"Disable",
"(",
"usergroup",
"string",
")",
"*",
"UsergroupsDisableCall",
"{",
"var",
"call",
"UsergroupsDisableCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"usergroup",
"=",
"usergroup",
... | // Disable creates a UsergroupsDisableCall object in preparation for accessing the usergroups.disable endpoint | [
"Disable",
"creates",
"a",
"UsergroupsDisableCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"usergroups",
".",
"disable",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/usergroups_gen.go#L178-L183 |
152,810 | lestrrat/go-slack | usergroups_gen.go | Enable | func (s *UsergroupsService) Enable(usergroup string) *UsergroupsEnableCall {
var call UsergroupsEnableCall
call.service = s
call.usergroup = usergroup
return &call
} | go | func (s *UsergroupsService) Enable(usergroup string) *UsergroupsEnableCall {
var call UsergroupsEnableCall
call.service = s
call.usergroup = usergroup
return &call
} | [
"func",
"(",
"s",
"*",
"UsergroupsService",
")",
"Enable",
"(",
"usergroup",
"string",
")",
"*",
"UsergroupsEnableCall",
"{",
"var",
"call",
"UsergroupsEnableCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"usergroup",
"=",
"usergroup",
"\n... | // Enable creates a UsergroupsEnableCall object in preparation for accessing the usergroups.enable endpoint | [
"Enable",
"creates",
"a",
"UsergroupsEnableCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"usergroups",
".",
"enable",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/usergroups_gen.go#L254-L259 |
152,811 | lestrrat/go-slack | usergroups_gen.go | ValidateArgs | func (c *UsergroupsEnableCall) ValidateArgs() error {
if len(c.usergroup) <= 0 {
return errors.New(`required field usergroup not initialized`)
}
return nil
} | go | func (c *UsergroupsEnableCall) ValidateArgs() error {
if len(c.usergroup) <= 0 {
return errors.New(`required field usergroup not initialized`)
}
return nil
} | [
"func",
"(",
"c",
"*",
"UsergroupsEnableCall",
")",
"ValidateArgs",
"(",
")",
"error",
"{",
"if",
"len",
"(",
"c",
".",
"usergroup",
")",
"<=",
"0",
"{",
"return",
"errors",
".",
"New",
"(",
"`required field usergroup not initialized`",
")",
"\n",
"}",
"\n... | // ValidateArgs checks that all required fields are set in the UsergroupsEnableCall object | [
"ValidateArgs",
"checks",
"that",
"all",
"required",
"fields",
"are",
"set",
"in",
"the",
"UsergroupsEnableCall",
"object"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/usergroups_gen.go#L268-L273 |
152,812 | lestrrat/go-slack | usergroups_gen.go | Values | func (c *UsergroupsEnableCall) Values() (url.Values, error) {
if err := c.ValidateArgs(); err != nil {
return nil, errors.Wrap(err, `failed validation`)
}
v := url.Values{}
v.Set(`token`, c.service.token)
if c.includeCount {
v.Set("include_count", "true")
}
v.Set("usergroup", c.usergroup)
return v, nil
} | go | func (c *UsergroupsEnableCall) Values() (url.Values, error) {
if err := c.ValidateArgs(); err != nil {
return nil, errors.Wrap(err, `failed validation`)
}
v := url.Values{}
v.Set(`token`, c.service.token)
if c.includeCount {
v.Set("include_count", "true")
}
v.Set("usergroup", c.usergroup)
return v, nil
} | [
"func",
"(",
"c",
"*",
"UsergroupsEnableCall",
")",
"Values",
"(",
")",
"(",
"url",
".",
"Values",
",",
"error",
")",
"{",
"if",
"err",
":=",
"c",
".",
"ValidateArgs",
"(",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"errors",
".",
"... | // Values returns the UsergroupsEnableCall object as url.Values | [
"Values",
"returns",
"the",
"UsergroupsEnableCall",
"object",
"as",
"url",
".",
"Values"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/usergroups_gen.go#L276-L289 |
152,813 | lestrrat/go-slack | usergroups_gen.go | List | func (s *UsergroupsService) List() *UsergroupsListCall {
var call UsergroupsListCall
call.service = s
return &call
} | go | func (s *UsergroupsService) List() *UsergroupsListCall {
var call UsergroupsListCall
call.service = s
return &call
} | [
"func",
"(",
"s",
"*",
"UsergroupsService",
")",
"List",
"(",
")",
"*",
"UsergroupsListCall",
"{",
"var",
"call",
"UsergroupsListCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"return",
"&",
"call",
"\n",
"}"
] | // List creates a UsergroupsListCall object in preparation for accessing the usergroups.list endpoint | [
"List",
"creates",
"a",
"UsergroupsListCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"usergroups",
".",
"list",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/usergroups_gen.go#L330-L334 |
152,814 | lestrrat/go-slack | usergroups_gen.go | IncludeUsers | func (c *UsergroupsListCall) IncludeUsers(includeUsers bool) *UsergroupsListCall {
c.includeUsers = includeUsers
return c
} | go | func (c *UsergroupsListCall) IncludeUsers(includeUsers bool) *UsergroupsListCall {
c.includeUsers = includeUsers
return c
} | [
"func",
"(",
"c",
"*",
"UsergroupsListCall",
")",
"IncludeUsers",
"(",
"includeUsers",
"bool",
")",
"*",
"UsergroupsListCall",
"{",
"c",
".",
"includeUsers",
"=",
"includeUsers",
"\n",
"return",
"c",
"\n",
"}"
] | // IncludeUsers sets the value for optional includeUsers parameter | [
"IncludeUsers",
"sets",
"the",
"value",
"for",
"optional",
"includeUsers",
"parameter"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/usergroups_gen.go#L349-L352 |
152,815 | lestrrat/go-slack | usergroups_gen.go | Values | func (c *UsergroupsListCall) Values() (url.Values, error) {
if err := c.ValidateArgs(); err != nil {
return nil, errors.Wrap(err, `failed validation`)
}
v := url.Values{}
v.Set(`token`, c.service.token)
if c.includeCount {
v.Set("include_count", "true")
}
if c.includeDisabled {
v.Set("include_disabled", "true")
}
if c.includeUsers {
v.Set("include_users", "true")
}
return v, nil
} | go | func (c *UsergroupsListCall) Values() (url.Values, error) {
if err := c.ValidateArgs(); err != nil {
return nil, errors.Wrap(err, `failed validation`)
}
v := url.Values{}
v.Set(`token`, c.service.token)
if c.includeCount {
v.Set("include_count", "true")
}
if c.includeDisabled {
v.Set("include_disabled", "true")
}
if c.includeUsers {
v.Set("include_users", "true")
}
return v, nil
} | [
"func",
"(",
"c",
"*",
"UsergroupsListCall",
")",
"Values",
"(",
")",
"(",
"url",
".",
"Values",
",",
"error",
")",
"{",
"if",
"err",
":=",
"c",
".",
"ValidateArgs",
"(",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"errors",
".",
"Wr... | // Values returns the UsergroupsListCall object as url.Values | [
"Values",
"returns",
"the",
"UsergroupsListCall",
"object",
"as",
"url",
".",
"Values"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/usergroups_gen.go#L360-L379 |
152,816 | lestrrat/go-slack | usergroups_gen.go | Update | func (s *UsergroupsService) Update(usergroup string) *UsergroupsUpdateCall {
var call UsergroupsUpdateCall
call.service = s
call.usergroup = usergroup
return &call
} | go | func (s *UsergroupsService) Update(usergroup string) *UsergroupsUpdateCall {
var call UsergroupsUpdateCall
call.service = s
call.usergroup = usergroup
return &call
} | [
"func",
"(",
"s",
"*",
"UsergroupsService",
")",
"Update",
"(",
"usergroup",
"string",
")",
"*",
"UsergroupsUpdateCall",
"{",
"var",
"call",
"UsergroupsUpdateCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"usergroup",
"=",
"usergroup",
"\n... | // Update creates a UsergroupsUpdateCall object in preparation for accessing the usergroups.update endpoint | [
"Update",
"creates",
"a",
"UsergroupsUpdateCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"usergroups",
".",
"update",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/usergroups_gen.go#L431-L436 |
152,817 | lestrrat/go-slack | usergroups_gen.go | Values | func (c *UsergroupsUpdateCall) Values() (url.Values, error) {
if err := c.ValidateArgs(); err != nil {
return nil, errors.Wrap(err, `failed validation`)
}
v := url.Values{}
v.Set(`token`, c.service.token)
if len(c.channels) > 0 {
v.Set("channels", c.channels)
}
if len(c.description) > 0 {
v.Set("description", c.description)
}
if len(c.handle) > 0 {
v.Set("handle", c.handle)
}
if c.includeCount {
v.Set("include_count", "true")
}
if len(c.name) > 0 {
v.Set("name", c.name)
}
v.Set("usergroup", c.usergroup)
return v, nil
} | go | func (c *UsergroupsUpdateCall) Values() (url.Values, error) {
if err := c.ValidateArgs(); err != nil {
return nil, errors.Wrap(err, `failed validation`)
}
v := url.Values{}
v.Set(`token`, c.service.token)
if len(c.channels) > 0 {
v.Set("channels", c.channels)
}
if len(c.description) > 0 {
v.Set("description", c.description)
}
if len(c.handle) > 0 {
v.Set("handle", c.handle)
}
if c.includeCount {
v.Set("include_count", "true")
}
if len(c.name) > 0 {
v.Set("name", c.name)
}
v.Set("usergroup", c.usergroup)
return v, nil
} | [
"func",
"(",
"c",
"*",
"UsergroupsUpdateCall",
")",
"Values",
"(",
")",
"(",
"url",
".",
"Values",
",",
"error",
")",
"{",
"if",
"err",
":=",
"c",
".",
"ValidateArgs",
"(",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"errors",
".",
"... | // Values returns the UsergroupsUpdateCall object as url.Values | [
"Values",
"returns",
"the",
"UsergroupsUpdateCall",
"object",
"as",
"url",
".",
"Values"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/usergroups_gen.go#L477-L506 |
152,818 | michiwend/gomusicbrainz | area.go | LookupArea | func (c *WS2Client) LookupArea(id MBID, inc ...string) (*Area, error) {
a := &Area{ID: id}
err := c.Lookup(a, inc...)
return a, err
} | go | func (c *WS2Client) LookupArea(id MBID, inc ...string) (*Area, error) {
a := &Area{ID: id}
err := c.Lookup(a, inc...)
return a, err
} | [
"func",
"(",
"c",
"*",
"WS2Client",
")",
"LookupArea",
"(",
"id",
"MBID",
",",
"inc",
"...",
"string",
")",
"(",
"*",
"Area",
",",
"error",
")",
"{",
"a",
":=",
"&",
"Area",
"{",
"ID",
":",
"id",
"}",
"\n",
"err",
":=",
"c",
".",
"Lookup",
"(... | // LookupArea performs an area lookup request for the given MBID. | [
"LookupArea",
"performs",
"an",
"area",
"lookup",
"request",
"for",
"the",
"given",
"MBID",
"."
] | 6c07e13dd396ba10bd9f8904be5018df94472839 | https://github.com/michiwend/gomusicbrainz/blob/6c07e13dd396ba10bd9f8904be5018df94472839/area.go#L59-L64 |
152,819 | michiwend/gomusicbrainz | area.go | ResultsWithScore | func (r *AreaSearchResponse) ResultsWithScore(score int) []*Area {
var res []*Area
for _, v := range r.Areas {
if r.Scores[v] >= score {
res = append(res, v)
}
}
return res
} | go | func (r *AreaSearchResponse) ResultsWithScore(score int) []*Area {
var res []*Area
for _, v := range r.Areas {
if r.Scores[v] >= score {
res = append(res, v)
}
}
return res
} | [
"func",
"(",
"r",
"*",
"AreaSearchResponse",
")",
"ResultsWithScore",
"(",
"score",
"int",
")",
"[",
"]",
"*",
"Area",
"{",
"var",
"res",
"[",
"]",
"*",
"Area",
"\n",
"for",
"_",
",",
"v",
":=",
"range",
"r",
".",
"Areas",
"{",
"if",
"r",
".",
... | // ResultsWithScore returns a slice of Areas with a min score. | [
"ResultsWithScore",
"returns",
"a",
"slice",
"of",
"Areas",
"with",
"a",
"min",
"score",
"."
] | 6c07e13dd396ba10bd9f8904be5018df94472839 | https://github.com/michiwend/gomusicbrainz/blob/6c07e13dd396ba10bd9f8904be5018df94472839/area.go#L112-L120 |
152,820 | lestrrat/go-slack | rtm_gen.go | Start | func (s *RTMService) Start() *RTMStartCall {
var call RTMStartCall
call.service = s
return &call
} | go | func (s *RTMService) Start() *RTMStartCall {
var call RTMStartCall
call.service = s
return &call
} | [
"func",
"(",
"s",
"*",
"RTMService",
")",
"Start",
"(",
")",
"*",
"RTMStartCall",
"{",
"var",
"call",
"RTMStartCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"return",
"&",
"call",
"\n",
"}"
] | // Start creates a RTMStartCall object in preparation for accessing the rtm.start endpoint | [
"Start",
"creates",
"a",
"RTMStartCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"rtm",
".",
"start",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/rtm_gen.go#L25-L29 |
152,821 | lestrrat/go-slack | rtm/client.go | Run | func (c *Client) Run(octx context.Context) error {
if pdebug.Enabled {
pdebug.Printf("rtm client: Run()")
defer pdebug.Printf("rtm client: end Run()")
}
octxwc, cancel := context.WithCancel(octx)
defer cancel()
ctx := newRtmCtx(octxwc, c.eventsCh)
ctx.backoffStrategy = c.backoffStrategy
ctx.pingInterval = c.pingInterval
go ctx.run()
// start a message ID generator
go func(ctx context.Context, ch chan int) {
defer close(ch)
msgid := 1
for {
select {
case <-ctx.Done():
return
case ch <- int(msgid):
// max is defined as int32, just to be small enough to not
// overflow the server side (which, we can't know about)
if msgid == math.MaxInt32 {
msgid = 0
} else {
msgid++
}
}
}
}(ctx, ctx.msgidCh)
for {
select {
case <-ctx.Done():
return nil
default:
}
if err := emitTimeout(ctx, &Event{typ: ClientConnectingEventType}, 5*time.Second); err != nil {
return errors.Wrap(err, `failed to emit connecting event`)
}
var conn *websocket.Conn
strategy := ctx.backoffStrategy
err := backoff.Retry(func() error {
res, err := c.client.RTM().Start().Do(ctx)
if err != nil {
log.Printf("failed to start RTM sesson: %s", err)
return err
}
conn, _, err = websocket.DefaultDialer.Dial(res.URL, nil)
if err != nil {
log.Printf("failed to dial to websocket: %s", err)
return err
}
return nil
}, backoff.WithContext(strategy, ctx))
if err != nil {
return errors.Wrap(err, `failed to connect to RTM endpoint`)
}
ctx.handleConn(conn)
}
return nil
} | go | func (c *Client) Run(octx context.Context) error {
if pdebug.Enabled {
pdebug.Printf("rtm client: Run()")
defer pdebug.Printf("rtm client: end Run()")
}
octxwc, cancel := context.WithCancel(octx)
defer cancel()
ctx := newRtmCtx(octxwc, c.eventsCh)
ctx.backoffStrategy = c.backoffStrategy
ctx.pingInterval = c.pingInterval
go ctx.run()
// start a message ID generator
go func(ctx context.Context, ch chan int) {
defer close(ch)
msgid := 1
for {
select {
case <-ctx.Done():
return
case ch <- int(msgid):
// max is defined as int32, just to be small enough to not
// overflow the server side (which, we can't know about)
if msgid == math.MaxInt32 {
msgid = 0
} else {
msgid++
}
}
}
}(ctx, ctx.msgidCh)
for {
select {
case <-ctx.Done():
return nil
default:
}
if err := emitTimeout(ctx, &Event{typ: ClientConnectingEventType}, 5*time.Second); err != nil {
return errors.Wrap(err, `failed to emit connecting event`)
}
var conn *websocket.Conn
strategy := ctx.backoffStrategy
err := backoff.Retry(func() error {
res, err := c.client.RTM().Start().Do(ctx)
if err != nil {
log.Printf("failed to start RTM sesson: %s", err)
return err
}
conn, _, err = websocket.DefaultDialer.Dial(res.URL, nil)
if err != nil {
log.Printf("failed to dial to websocket: %s", err)
return err
}
return nil
}, backoff.WithContext(strategy, ctx))
if err != nil {
return errors.Wrap(err, `failed to connect to RTM endpoint`)
}
ctx.handleConn(conn)
}
return nil
} | [
"func",
"(",
"c",
"*",
"Client",
")",
"Run",
"(",
"octx",
"context",
".",
"Context",
")",
"error",
"{",
"if",
"pdebug",
".",
"Enabled",
"{",
"pdebug",
".",
"Printf",
"(",
"\"",
"\"",
")",
"\n",
"defer",
"pdebug",
".",
"Printf",
"(",
"\"",
"\"",
"... | // Run starts the RTM run loop. | [
"Run",
"starts",
"the",
"RTM",
"run",
"loop",
"."
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/rtm/client.go#L74-L144 |
152,822 | lestrrat/go-slack | rtm/client.go | trywrite | func (ctx *rtmCtx) trywrite(e *Event) error {
tctx, cancel := context.WithTimeout(ctx, ctx.writeTimeout)
defer cancel()
select {
case <-tctx.Done():
switch err := tctx.Err(); err {
case context.DeadlineExceeded:
return errors.New("write timeout")
default:
return err
}
case ctx.outbuf <- e:
return nil
}
return errors.New("unreachable")
} | go | func (ctx *rtmCtx) trywrite(e *Event) error {
tctx, cancel := context.WithTimeout(ctx, ctx.writeTimeout)
defer cancel()
select {
case <-tctx.Done():
switch err := tctx.Err(); err {
case context.DeadlineExceeded:
return errors.New("write timeout")
default:
return err
}
case ctx.outbuf <- e:
return nil
}
return errors.New("unreachable")
} | [
"func",
"(",
"ctx",
"*",
"rtmCtx",
")",
"trywrite",
"(",
"e",
"*",
"Event",
")",
"error",
"{",
"tctx",
",",
"cancel",
":=",
"context",
".",
"WithTimeout",
"(",
"ctx",
",",
"ctx",
".",
"writeTimeout",
")",
"\n",
"defer",
"cancel",
"(",
")",
"\n\n",
... | // Attempt to write to the outgoing channel, within the
// alloted time frame. | [
"Attempt",
"to",
"write",
"to",
"the",
"outgoing",
"channel",
"within",
"the",
"alloted",
"time",
"frame",
"."
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/rtm/client.go#L280-L297 |
152,823 | lestrrat/go-slack | channels_gen.go | Archive | func (s *ChannelsService) Archive(channel string) *ChannelsArchiveCall {
var call ChannelsArchiveCall
call.service = s
call.channel = channel
return &call
} | go | func (s *ChannelsService) Archive(channel string) *ChannelsArchiveCall {
var call ChannelsArchiveCall
call.service = s
call.channel = channel
return &call
} | [
"func",
"(",
"s",
"*",
"ChannelsService",
")",
"Archive",
"(",
"channel",
"string",
")",
"*",
"ChannelsArchiveCall",
"{",
"var",
"call",
"ChannelsArchiveCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"channel",
"=",
"channel",
"\n",
"ret... | // Archive creates a ChannelsArchiveCall object in preparation for accessing the channels.archive endpoint | [
"Archive",
"creates",
"a",
"ChannelsArchiveCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"channels",
".",
"archive",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/channels_gen.go#L129-L134 |
152,824 | lestrrat/go-slack | channels_gen.go | Create | func (s *ChannelsService) Create(name string) *ChannelsCreateCall {
var call ChannelsCreateCall
call.service = s
call.name = name
return &call
} | go | func (s *ChannelsService) Create(name string) *ChannelsCreateCall {
var call ChannelsCreateCall
call.service = s
call.name = name
return &call
} | [
"func",
"(",
"s",
"*",
"ChannelsService",
")",
"Create",
"(",
"name",
"string",
")",
"*",
"ChannelsCreateCall",
"{",
"var",
"call",
"ChannelsCreateCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"name",
"=",
"name",
"\n",
"return",
"&",... | // Create creates a ChannelsCreateCall object in preparation for accessing the channels.create endpoint | [
"Create",
"creates",
"a",
"ChannelsCreateCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"channels",
".",
"create",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/channels_gen.go#L187-L192 |
152,825 | lestrrat/go-slack | channels_gen.go | History | func (s *ChannelsService) History(channel string) *ChannelsHistoryCall {
var call ChannelsHistoryCall
call.service = s
call.channel = channel
return &call
} | go | func (s *ChannelsService) History(channel string) *ChannelsHistoryCall {
var call ChannelsHistoryCall
call.service = s
call.channel = channel
return &call
} | [
"func",
"(",
"s",
"*",
"ChannelsService",
")",
"History",
"(",
"channel",
"string",
")",
"*",
"ChannelsHistoryCall",
"{",
"var",
"call",
"ChannelsHistoryCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"channel",
"=",
"channel",
"\n",
"ret... | // History creates a ChannelsHistoryCall object in preparation for accessing the channels.history endpoint | [
"History",
"creates",
"a",
"ChannelsHistoryCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"channels",
".",
"history",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/channels_gen.go#L262-L267 |
152,826 | lestrrat/go-slack | channels_gen.go | Values | func (c *ChannelsHistoryCall) Values() (url.Values, error) {
if err := c.ValidateArgs(); err != nil {
return nil, errors.Wrap(err, `failed validation`)
}
v := url.Values{}
v.Set(`token`, c.service.token)
v.Set("channel", c.channel)
if c.count > 0 {
v.Set("count", strconv.Itoa(c.count))
}
if c.inclusive {
v.Set("inclusive", "true")
}
if len(c.latest) > 0 {
v.Set("latest", c.latest)
}
if len(c.oldest) > 0 {
v.Set("oldest", c.oldest)
}
if len(c.timestamp) > 0 {
v.Set("ts", c.timestamp)
}
if c.unreads {
v.Set("unreads", "true")
}
return v, nil
} | go | func (c *ChannelsHistoryCall) Values() (url.Values, error) {
if err := c.ValidateArgs(); err != nil {
return nil, errors.Wrap(err, `failed validation`)
}
v := url.Values{}
v.Set(`token`, c.service.token)
v.Set("channel", c.channel)
if c.count > 0 {
v.Set("count", strconv.Itoa(c.count))
}
if c.inclusive {
v.Set("inclusive", "true")
}
if len(c.latest) > 0 {
v.Set("latest", c.latest)
}
if len(c.oldest) > 0 {
v.Set("oldest", c.oldest)
}
if len(c.timestamp) > 0 {
v.Set("ts", c.timestamp)
}
if c.unreads {
v.Set("unreads", "true")
}
return v, nil
} | [
"func",
"(",
"c",
"*",
"ChannelsHistoryCall",
")",
"Values",
"(",
")",
"(",
"url",
".",
"Values",
",",
"error",
")",
"{",
"if",
"err",
":=",
"c",
".",
"ValidateArgs",
"(",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"errors",
".",
"W... | // Values returns the ChannelsHistoryCall object as url.Values | [
"Values",
"returns",
"the",
"ChannelsHistoryCall",
"object",
"as",
"url",
".",
"Values"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/channels_gen.go#L314-L347 |
152,827 | lestrrat/go-slack | channels_gen.go | Info | func (s *ChannelsService) Info(channel string) *ChannelsInfoCall {
var call ChannelsInfoCall
call.service = s
call.channel = channel
return &call
} | go | func (s *ChannelsService) Info(channel string) *ChannelsInfoCall {
var call ChannelsInfoCall
call.service = s
call.channel = channel
return &call
} | [
"func",
"(",
"s",
"*",
"ChannelsService",
")",
"Info",
"(",
"channel",
"string",
")",
"*",
"ChannelsInfoCall",
"{",
"var",
"call",
"ChannelsInfoCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"channel",
"=",
"channel",
"\n",
"return",
"... | // Info creates a ChannelsInfoCall object in preparation for accessing the channels.info endpoint | [
"Info",
"creates",
"a",
"ChannelsInfoCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"channels",
".",
"info",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/channels_gen.go#L411-L416 |
152,828 | lestrrat/go-slack | channels_gen.go | Invite | func (s *ChannelsService) Invite(channel string, user string) *ChannelsInviteCall {
var call ChannelsInviteCall
call.service = s
call.channel = channel
call.user = user
return &call
} | go | func (s *ChannelsService) Invite(channel string, user string) *ChannelsInviteCall {
var call ChannelsInviteCall
call.service = s
call.channel = channel
call.user = user
return &call
} | [
"func",
"(",
"s",
"*",
"ChannelsService",
")",
"Invite",
"(",
"channel",
"string",
",",
"user",
"string",
")",
"*",
"ChannelsInviteCall",
"{",
"var",
"call",
"ChannelsInviteCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"channel",
"=",
... | // Invite creates a ChannelsInviteCall object in preparation for accessing the channels.invite endpoint | [
"Invite",
"creates",
"a",
"ChannelsInviteCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"channels",
".",
"invite",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/channels_gen.go#L487-L493 |
152,829 | lestrrat/go-slack | channels_gen.go | Join | func (s *ChannelsService) Join(name string) *ChannelsJoinCall {
var call ChannelsJoinCall
call.service = s
call.name = name
return &call
} | go | func (s *ChannelsService) Join(name string) *ChannelsJoinCall {
var call ChannelsJoinCall
call.service = s
call.name = name
return &call
} | [
"func",
"(",
"s",
"*",
"ChannelsService",
")",
"Join",
"(",
"name",
"string",
")",
"*",
"ChannelsJoinCall",
"{",
"var",
"call",
"ChannelsJoinCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"name",
"=",
"name",
"\n",
"return",
"&",
"ca... | // Join creates a ChannelsJoinCall object in preparation for accessing the channels.join endpoint | [
"Join",
"creates",
"a",
"ChannelsJoinCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"channels",
".",
"join",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/channels_gen.go#L555-L560 |
152,830 | lestrrat/go-slack | channels_gen.go | ValidateArgs | func (c *ChannelsJoinCall) ValidateArgs() error {
if len(c.name) <= 0 {
return errors.New(`required field name not initialized`)
}
return nil
} | go | func (c *ChannelsJoinCall) ValidateArgs() error {
if len(c.name) <= 0 {
return errors.New(`required field name not initialized`)
}
return nil
} | [
"func",
"(",
"c",
"*",
"ChannelsJoinCall",
")",
"ValidateArgs",
"(",
")",
"error",
"{",
"if",
"len",
"(",
"c",
".",
"name",
")",
"<=",
"0",
"{",
"return",
"errors",
".",
"New",
"(",
"`required field name not initialized`",
")",
"\n",
"}",
"\n",
"return",... | // ValidateArgs checks that all required fields are set in the ChannelsJoinCall object | [
"ValidateArgs",
"checks",
"that",
"all",
"required",
"fields",
"are",
"set",
"in",
"the",
"ChannelsJoinCall",
"object"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/channels_gen.go#L569-L574 |
152,831 | lestrrat/go-slack | channels_gen.go | Kick | func (s *ChannelsService) Kick(channel string, user string) *ChannelsKickCall {
var call ChannelsKickCall
call.service = s
call.channel = channel
call.user = user
return &call
} | go | func (s *ChannelsService) Kick(channel string, user string) *ChannelsKickCall {
var call ChannelsKickCall
call.service = s
call.channel = channel
call.user = user
return &call
} | [
"func",
"(",
"s",
"*",
"ChannelsService",
")",
"Kick",
"(",
"channel",
"string",
",",
"user",
"string",
")",
"*",
"ChannelsKickCall",
"{",
"var",
"call",
"ChannelsKickCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"channel",
"=",
"chan... | // Kick creates a ChannelsKickCall object in preparation for accessing the channels.kick endpoint | [
"Kick",
"creates",
"a",
"ChannelsKickCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"channels",
".",
"kick",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/channels_gen.go#L631-L637 |
152,832 | lestrrat/go-slack | channels_gen.go | Leave | func (s *ChannelsService) Leave(channel string) *ChannelsLeaveCall {
var call ChannelsLeaveCall
call.service = s
call.channel = channel
return &call
} | go | func (s *ChannelsService) Leave(channel string) *ChannelsLeaveCall {
var call ChannelsLeaveCall
call.service = s
call.channel = channel
return &call
} | [
"func",
"(",
"s",
"*",
"ChannelsService",
")",
"Leave",
"(",
"channel",
"string",
")",
"*",
"ChannelsLeaveCall",
"{",
"var",
"call",
"ChannelsLeaveCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"channel",
"=",
"channel",
"\n",
"return",
... | // Leave creates a ChannelsLeaveCall object in preparation for accessing the channels.leave endpoint | [
"Leave",
"creates",
"a",
"ChannelsLeaveCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"channels",
".",
"leave",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/channels_gen.go#L698-L703 |
152,833 | lestrrat/go-slack | channels_gen.go | List | func (s *ChannelsService) List() *ChannelsListCall {
var call ChannelsListCall
call.service = s
return &call
} | go | func (s *ChannelsService) List() *ChannelsListCall {
var call ChannelsListCall
call.service = s
return &call
} | [
"func",
"(",
"s",
"*",
"ChannelsService",
")",
"List",
"(",
")",
"*",
"ChannelsListCall",
"{",
"var",
"call",
"ChannelsListCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"return",
"&",
"call",
"\n",
"}"
] | // List creates a ChannelsListCall object in preparation for accessing the channels.list endpoint | [
"List",
"creates",
"a",
"ChannelsListCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"channels",
".",
"list",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/channels_gen.go#L756-L760 |
152,834 | lestrrat/go-slack | channels_gen.go | ExcludeArchive | func (c *ChannelsListCall) ExcludeArchive(excludeArchive bool) *ChannelsListCall {
c.excludeArchive = excludeArchive
return c
} | go | func (c *ChannelsListCall) ExcludeArchive(excludeArchive bool) *ChannelsListCall {
c.excludeArchive = excludeArchive
return c
} | [
"func",
"(",
"c",
"*",
"ChannelsListCall",
")",
"ExcludeArchive",
"(",
"excludeArchive",
"bool",
")",
"*",
"ChannelsListCall",
"{",
"c",
".",
"excludeArchive",
"=",
"excludeArchive",
"\n",
"return",
"c",
"\n",
"}"
] | // ExcludeArchive sets the value for optional excludeArchive parameter | [
"ExcludeArchive",
"sets",
"the",
"value",
"for",
"optional",
"excludeArchive",
"parameter"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/channels_gen.go#L763-L766 |
152,835 | lestrrat/go-slack | channels_gen.go | Values | func (c *ChannelsListCall) Values() (url.Values, error) {
if err := c.ValidateArgs(); err != nil {
return nil, errors.Wrap(err, `failed validation`)
}
v := url.Values{}
v.Set(`token`, c.service.token)
if c.excludeArchive {
v.Set("exclude_archive", "true")
}
if c.excludeMembers {
v.Set("exclude_members", "true")
}
if c.limit > 0 {
v.Set("limit", strconv.Itoa(c.limit))
}
return v, nil
} | go | func (c *ChannelsListCall) Values() (url.Values, error) {
if err := c.ValidateArgs(); err != nil {
return nil, errors.Wrap(err, `failed validation`)
}
v := url.Values{}
v.Set(`token`, c.service.token)
if c.excludeArchive {
v.Set("exclude_archive", "true")
}
if c.excludeMembers {
v.Set("exclude_members", "true")
}
if c.limit > 0 {
v.Set("limit", strconv.Itoa(c.limit))
}
return v, nil
} | [
"func",
"(",
"c",
"*",
"ChannelsListCall",
")",
"Values",
"(",
")",
"(",
"url",
".",
"Values",
",",
"error",
")",
"{",
"if",
"err",
":=",
"c",
".",
"ValidateArgs",
"(",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"errors",
".",
"Wrap... | // Values returns the ChannelsListCall object as url.Values | [
"Values",
"returns",
"the",
"ChannelsListCall",
"object",
"as",
"url",
".",
"Values"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/channels_gen.go#L786-L805 |
152,836 | lestrrat/go-slack | channels_gen.go | Mark | func (s *ChannelsService) Mark(channel string) *ChannelsMarkCall {
var call ChannelsMarkCall
call.service = s
call.channel = channel
return &call
} | go | func (s *ChannelsService) Mark(channel string) *ChannelsMarkCall {
var call ChannelsMarkCall
call.service = s
call.channel = channel
return &call
} | [
"func",
"(",
"s",
"*",
"ChannelsService",
")",
"Mark",
"(",
"channel",
"string",
")",
"*",
"ChannelsMarkCall",
"{",
"var",
"call",
"ChannelsMarkCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"channel",
"=",
"channel",
"\n",
"return",
"... | // Mark creates a ChannelsMarkCall object in preparation for accessing the channels.mark endpoint | [
"Mark",
"creates",
"a",
"ChannelsMarkCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"channels",
".",
"mark",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/channels_gen.go#L857-L862 |
152,837 | lestrrat/go-slack | channels_gen.go | Rename | func (s *ChannelsService) Rename(channel string, name string) *ChannelsRenameCall {
var call ChannelsRenameCall
call.service = s
call.channel = channel
call.name = name
return &call
} | go | func (s *ChannelsService) Rename(channel string, name string) *ChannelsRenameCall {
var call ChannelsRenameCall
call.service = s
call.channel = channel
call.name = name
return &call
} | [
"func",
"(",
"s",
"*",
"ChannelsService",
")",
"Rename",
"(",
"channel",
"string",
",",
"name",
"string",
")",
"*",
"ChannelsRenameCall",
"{",
"var",
"call",
"ChannelsRenameCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"channel",
"=",
... | // Rename creates a ChannelsRenameCall object in preparation for accessing the channels.rename endpoint | [
"Rename",
"creates",
"a",
"ChannelsRenameCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"channels",
".",
"rename",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/channels_gen.go#L928-L934 |
152,838 | lestrrat/go-slack | channels_gen.go | Replies | func (s *ChannelsService) Replies(channel string, threadTimestamp string) *ChannelsRepliesCall {
var call ChannelsRepliesCall
call.service = s
call.channel = channel
call.threadTimestamp = threadTimestamp
return &call
} | go | func (s *ChannelsService) Replies(channel string, threadTimestamp string) *ChannelsRepliesCall {
var call ChannelsRepliesCall
call.service = s
call.channel = channel
call.threadTimestamp = threadTimestamp
return &call
} | [
"func",
"(",
"s",
"*",
"ChannelsService",
")",
"Replies",
"(",
"channel",
"string",
",",
"threadTimestamp",
"string",
")",
"*",
"ChannelsRepliesCall",
"{",
"var",
"call",
"ChannelsRepliesCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"chan... | // Replies creates a ChannelsRepliesCall object in preparation for accessing the channels.replies endpoint | [
"Replies",
"creates",
"a",
"ChannelsRepliesCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"channels",
".",
"replies",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/channels_gen.go#L1013-L1019 |
152,839 | lestrrat/go-slack | channels_gen.go | SetPurpose | func (s *ChannelsService) SetPurpose(channel string, purpose string) *ChannelsSetPurposeCall {
var call ChannelsSetPurposeCall
call.service = s
call.channel = channel
call.purpose = purpose
return &call
} | go | func (s *ChannelsService) SetPurpose(channel string, purpose string) *ChannelsSetPurposeCall {
var call ChannelsSetPurposeCall
call.service = s
call.channel = channel
call.purpose = purpose
return &call
} | [
"func",
"(",
"s",
"*",
"ChannelsService",
")",
"SetPurpose",
"(",
"channel",
"string",
",",
"purpose",
"string",
")",
"*",
"ChannelsSetPurposeCall",
"{",
"var",
"call",
"ChannelsSetPurposeCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"cha... | // SetPurpose creates a ChannelsSetPurposeCall object in preparation for accessing the channels.setPurpose endpoint | [
"SetPurpose",
"creates",
"a",
"ChannelsSetPurposeCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"channels",
".",
"setPurpose",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/channels_gen.go#L1081-L1087 |
152,840 | lestrrat/go-slack | channels_gen.go | SetTopic | func (s *ChannelsService) SetTopic(channel string, topic string) *ChannelsSetTopicCall {
var call ChannelsSetTopicCall
call.service = s
call.channel = channel
call.topic = topic
return &call
} | go | func (s *ChannelsService) SetTopic(channel string, topic string) *ChannelsSetTopicCall {
var call ChannelsSetTopicCall
call.service = s
call.channel = channel
call.topic = topic
return &call
} | [
"func",
"(",
"s",
"*",
"ChannelsService",
")",
"SetTopic",
"(",
"channel",
"string",
",",
"topic",
"string",
")",
"*",
"ChannelsSetTopicCall",
"{",
"var",
"call",
"ChannelsSetTopicCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"channel",
... | // SetTopic creates a ChannelsSetTopicCall object in preparation for accessing the channels.setTopic endpoint | [
"SetTopic",
"creates",
"a",
"ChannelsSetTopicCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"channels",
".",
"setTopic",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/channels_gen.go#L1149-L1155 |
152,841 | lestrrat/go-slack | channels_gen.go | Unarchive | func (s *ChannelsService) Unarchive(channel string) *ChannelsUnarchiveCall {
var call ChannelsUnarchiveCall
call.service = s
call.channel = channel
return &call
} | go | func (s *ChannelsService) Unarchive(channel string) *ChannelsUnarchiveCall {
var call ChannelsUnarchiveCall
call.service = s
call.channel = channel
return &call
} | [
"func",
"(",
"s",
"*",
"ChannelsService",
")",
"Unarchive",
"(",
"channel",
"string",
")",
"*",
"ChannelsUnarchiveCall",
"{",
"var",
"call",
"ChannelsUnarchiveCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"channel",
"=",
"channel",
"\n",
... | // Unarchive creates a ChannelsUnarchiveCall object in preparation for accessing the channels.unarchive endpoint | [
"Unarchive",
"creates",
"a",
"ChannelsUnarchiveCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"channels",
".",
"unarchive",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/channels_gen.go#L1217-L1222 |
152,842 | lestrrat/go-slack | channels_gen.go | Do | func (c *ChannelsUnarchiveCall) Do(ctx context.Context) error {
const endpoint = "channels.unarchive"
v, err := c.Values()
if err != nil {
return err
}
var res struct {
objects.GenericResponse
}
if err := c.service.client.postForm(ctx, endpoint, v, &res); err != nil {
return errors.Wrap(err, `failed to post to channels.unarchive`)
}
if !res.OK {
return errors.New(res.Error.String())
}
return nil
} | go | func (c *ChannelsUnarchiveCall) Do(ctx context.Context) error {
const endpoint = "channels.unarchive"
v, err := c.Values()
if err != nil {
return err
}
var res struct {
objects.GenericResponse
}
if err := c.service.client.postForm(ctx, endpoint, v, &res); err != nil {
return errors.Wrap(err, `failed to post to channels.unarchive`)
}
if !res.OK {
return errors.New(res.Error.String())
}
return nil
} | [
"func",
"(",
"c",
"*",
"ChannelsUnarchiveCall",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"error",
"{",
"const",
"endpoint",
"=",
"\"",
"\"",
"\n",
"v",
",",
"err",
":=",
"c",
".",
"Values",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
... | // Do executes the call to access channels.unarchive endpoint | [
"Do",
"executes",
"the",
"call",
"to",
"access",
"channels",
".",
"unarchive",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/channels_gen.go#L1245-L1262 |
152,843 | lestrrat/go-slack | groups_gen.go | Archive | func (s *GroupsService) Archive(channel string) *GroupsArchiveCall {
var call GroupsArchiveCall
call.service = s
call.channel = channel
return &call
} | go | func (s *GroupsService) Archive(channel string) *GroupsArchiveCall {
var call GroupsArchiveCall
call.service = s
call.channel = channel
return &call
} | [
"func",
"(",
"s",
"*",
"GroupsService",
")",
"Archive",
"(",
"channel",
"string",
")",
"*",
"GroupsArchiveCall",
"{",
"var",
"call",
"GroupsArchiveCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"channel",
"=",
"channel",
"\n",
"return",
... | // Archive creates a GroupsArchiveCall object in preparation for accessing the groups.archive endpoint | [
"Archive",
"creates",
"a",
"GroupsArchiveCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"groups",
".",
"archive",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/groups_gen.go#L132-L137 |
152,844 | lestrrat/go-slack | groups_gen.go | Values | func (c *GroupsArchiveCall) Values() (url.Values, error) {
if err := c.ValidateArgs(); err != nil {
return nil, errors.Wrap(err, `failed validation`)
}
v := url.Values{}
v.Set(`token`, c.service.token)
v.Set("channel", c.channel)
return v, nil
} | go | func (c *GroupsArchiveCall) Values() (url.Values, error) {
if err := c.ValidateArgs(); err != nil {
return nil, errors.Wrap(err, `failed validation`)
}
v := url.Values{}
v.Set(`token`, c.service.token)
v.Set("channel", c.channel)
return v, nil
} | [
"func",
"(",
"c",
"*",
"GroupsArchiveCall",
")",
"Values",
"(",
")",
"(",
"url",
".",
"Values",
",",
"error",
")",
"{",
"if",
"err",
":=",
"c",
".",
"ValidateArgs",
"(",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"errors",
".",
"Wra... | // Values returns the GroupsArchiveCall object as url.Values | [
"Values",
"returns",
"the",
"GroupsArchiveCall",
"object",
"as",
"url",
".",
"Values"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/groups_gen.go#L148-L157 |
152,845 | lestrrat/go-slack | groups_gen.go | Create | func (s *GroupsService) Create(name string) *GroupsCreateCall {
var call GroupsCreateCall
call.service = s
call.name = name
return &call
} | go | func (s *GroupsService) Create(name string) *GroupsCreateCall {
var call GroupsCreateCall
call.service = s
call.name = name
return &call
} | [
"func",
"(",
"s",
"*",
"GroupsService",
")",
"Create",
"(",
"name",
"string",
")",
"*",
"GroupsCreateCall",
"{",
"var",
"call",
"GroupsCreateCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"name",
"=",
"name",
"\n",
"return",
"&",
"ca... | // Create creates a GroupsCreateCall object in preparation for accessing the groups.create endpoint | [
"Create",
"creates",
"a",
"GroupsCreateCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"groups",
".",
"create",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/groups_gen.go#L190-L195 |
152,846 | lestrrat/go-slack | groups_gen.go | CreateChild | func (s *GroupsService) CreateChild(channel string) *GroupsCreateChildCall {
var call GroupsCreateChildCall
call.service = s
call.channel = channel
return &call
} | go | func (s *GroupsService) CreateChild(channel string) *GroupsCreateChildCall {
var call GroupsCreateChildCall
call.service = s
call.channel = channel
return &call
} | [
"func",
"(",
"s",
"*",
"GroupsService",
")",
"CreateChild",
"(",
"channel",
"string",
")",
"*",
"GroupsCreateChildCall",
"{",
"var",
"call",
"GroupsCreateChildCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"channel",
"=",
"channel",
"\n",
... | // CreateChild creates a GroupsCreateChildCall object in preparation for accessing the groups.createChild endpoint | [
"CreateChild",
"creates",
"a",
"GroupsCreateChildCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"groups",
".",
"createChild",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/groups_gen.go#L266-L271 |
152,847 | lestrrat/go-slack | groups_gen.go | History | func (s *GroupsService) History(channel string) *GroupsHistoryCall {
var call GroupsHistoryCall
call.service = s
call.channel = channel
return &call
} | go | func (s *GroupsService) History(channel string) *GroupsHistoryCall {
var call GroupsHistoryCall
call.service = s
call.channel = channel
return &call
} | [
"func",
"(",
"s",
"*",
"GroupsService",
")",
"History",
"(",
"channel",
"string",
")",
"*",
"GroupsHistoryCall",
"{",
"var",
"call",
"GroupsHistoryCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"channel",
"=",
"channel",
"\n",
"return",
... | // History creates a GroupsHistoryCall object in preparation for accessing the groups.history endpoint | [
"History",
"creates",
"a",
"GroupsHistoryCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"groups",
".",
"history",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/groups_gen.go#L325-L330 |
152,848 | lestrrat/go-slack | groups_gen.go | Info | func (s *GroupsService) Info(channel string) *GroupsInfoCall {
var call GroupsInfoCall
call.service = s
call.channel = channel
return &call
} | go | func (s *GroupsService) Info(channel string) *GroupsInfoCall {
var call GroupsInfoCall
call.service = s
call.channel = channel
return &call
} | [
"func",
"(",
"s",
"*",
"GroupsService",
")",
"Info",
"(",
"channel",
"string",
")",
"*",
"GroupsInfoCall",
"{",
"var",
"call",
"GroupsInfoCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"channel",
"=",
"channel",
"\n",
"return",
"&",
... | // Info creates a GroupsInfoCall object in preparation for accessing the groups.info endpoint | [
"Info",
"creates",
"a",
"GroupsInfoCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"groups",
".",
"info",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/groups_gen.go#L462-L467 |
152,849 | lestrrat/go-slack | groups_gen.go | Invite | func (s *GroupsService) Invite(channel string, user string) *GroupsInviteCall {
var call GroupsInviteCall
call.service = s
call.channel = channel
call.user = user
return &call
} | go | func (s *GroupsService) Invite(channel string, user string) *GroupsInviteCall {
var call GroupsInviteCall
call.service = s
call.channel = channel
call.user = user
return &call
} | [
"func",
"(",
"s",
"*",
"GroupsService",
")",
"Invite",
"(",
"channel",
"string",
",",
"user",
"string",
")",
"*",
"GroupsInviteCall",
"{",
"var",
"call",
"GroupsInviteCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"channel",
"=",
"chan... | // Invite creates a GroupsInviteCall object in preparation for accessing the groups.invite endpoint | [
"Invite",
"creates",
"a",
"GroupsInviteCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"groups",
".",
"invite",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/groups_gen.go#L538-L544 |
152,850 | lestrrat/go-slack | groups_gen.go | ValidateArgs | func (c *GroupsInviteCall) ValidateArgs() error {
if len(c.channel) <= 0 {
return errors.New(`required field channel not initialized`)
}
if len(c.user) <= 0 {
return errors.New(`required field user not initialized`)
}
return nil
} | go | func (c *GroupsInviteCall) ValidateArgs() error {
if len(c.channel) <= 0 {
return errors.New(`required field channel not initialized`)
}
if len(c.user) <= 0 {
return errors.New(`required field user not initialized`)
}
return nil
} | [
"func",
"(",
"c",
"*",
"GroupsInviteCall",
")",
"ValidateArgs",
"(",
")",
"error",
"{",
"if",
"len",
"(",
"c",
".",
"channel",
")",
"<=",
"0",
"{",
"return",
"errors",
".",
"New",
"(",
"`required field channel not initialized`",
")",
"\n",
"}",
"\n",
"if... | // ValidateArgs checks that all required fields are set in the GroupsInviteCall object | [
"ValidateArgs",
"checks",
"that",
"all",
"required",
"fields",
"are",
"set",
"in",
"the",
"GroupsInviteCall",
"object"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/groups_gen.go#L547-L555 |
152,851 | lestrrat/go-slack | groups_gen.go | Kick | func (s *GroupsService) Kick(channel string, user string) *GroupsKickCall {
var call GroupsKickCall
call.service = s
call.channel = channel
call.user = user
return &call
} | go | func (s *GroupsService) Kick(channel string, user string) *GroupsKickCall {
var call GroupsKickCall
call.service = s
call.channel = channel
call.user = user
return &call
} | [
"func",
"(",
"s",
"*",
"GroupsService",
")",
"Kick",
"(",
"channel",
"string",
",",
"user",
"string",
")",
"*",
"GroupsKickCall",
"{",
"var",
"call",
"GroupsKickCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"channel",
"=",
"channel",
... | // Kick creates a GroupsKickCall object in preparation for accessing the groups.kick endpoint | [
"Kick",
"creates",
"a",
"GroupsKickCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"groups",
".",
"kick",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/groups_gen.go#L607-L613 |
152,852 | lestrrat/go-slack | groups_gen.go | Leave | func (s *GroupsService) Leave(channel string) *GroupsLeaveCall {
var call GroupsLeaveCall
call.service = s
call.channel = channel
return &call
} | go | func (s *GroupsService) Leave(channel string) *GroupsLeaveCall {
var call GroupsLeaveCall
call.service = s
call.channel = channel
return &call
} | [
"func",
"(",
"s",
"*",
"GroupsService",
")",
"Leave",
"(",
"channel",
"string",
")",
"*",
"GroupsLeaveCall",
"{",
"var",
"call",
"GroupsLeaveCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"channel",
"=",
"channel",
"\n",
"return",
"&",... | // Leave creates a GroupsLeaveCall object in preparation for accessing the groups.leave endpoint | [
"Leave",
"creates",
"a",
"GroupsLeaveCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"groups",
".",
"leave",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/groups_gen.go#L674-L679 |
152,853 | lestrrat/go-slack | groups_gen.go | List | func (s *GroupsService) List() *GroupsListCall {
var call GroupsListCall
call.service = s
return &call
} | go | func (s *GroupsService) List() *GroupsListCall {
var call GroupsListCall
call.service = s
return &call
} | [
"func",
"(",
"s",
"*",
"GroupsService",
")",
"List",
"(",
")",
"*",
"GroupsListCall",
"{",
"var",
"call",
"GroupsListCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"return",
"&",
"call",
"\n",
"}"
] | // List creates a GroupsListCall object in preparation for accessing the groups.list endpoint | [
"List",
"creates",
"a",
"GroupsListCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"groups",
".",
"list",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/groups_gen.go#L732-L736 |
152,854 | lestrrat/go-slack | groups_gen.go | ExcludeArchived | func (c *GroupsListCall) ExcludeArchived(excludeArchived bool) *GroupsListCall {
c.excludeArchived = excludeArchived
return c
} | go | func (c *GroupsListCall) ExcludeArchived(excludeArchived bool) *GroupsListCall {
c.excludeArchived = excludeArchived
return c
} | [
"func",
"(",
"c",
"*",
"GroupsListCall",
")",
"ExcludeArchived",
"(",
"excludeArchived",
"bool",
")",
"*",
"GroupsListCall",
"{",
"c",
".",
"excludeArchived",
"=",
"excludeArchived",
"\n",
"return",
"c",
"\n",
"}"
] | // ExcludeArchived sets the value for optional excludeArchived parameter | [
"ExcludeArchived",
"sets",
"the",
"value",
"for",
"optional",
"excludeArchived",
"parameter"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/groups_gen.go#L739-L742 |
152,855 | lestrrat/go-slack | groups_gen.go | Values | func (c *GroupsListCall) Values() (url.Values, error) {
if err := c.ValidateArgs(); err != nil {
return nil, errors.Wrap(err, `failed validation`)
}
v := url.Values{}
v.Set(`token`, c.service.token)
if c.excludeArchived {
v.Set("exclude_archived", "true")
}
if c.excludeMembers {
v.Set("exclude_members", "true")
}
return v, nil
} | go | func (c *GroupsListCall) Values() (url.Values, error) {
if err := c.ValidateArgs(); err != nil {
return nil, errors.Wrap(err, `failed validation`)
}
v := url.Values{}
v.Set(`token`, c.service.token)
if c.excludeArchived {
v.Set("exclude_archived", "true")
}
if c.excludeMembers {
v.Set("exclude_members", "true")
}
return v, nil
} | [
"func",
"(",
"c",
"*",
"GroupsListCall",
")",
"Values",
"(",
")",
"(",
"url",
".",
"Values",
",",
"error",
")",
"{",
"if",
"err",
":=",
"c",
".",
"ValidateArgs",
"(",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"errors",
".",
"Wrap",... | // Values returns the GroupsListCall object as url.Values | [
"Values",
"returns",
"the",
"GroupsListCall",
"object",
"as",
"url",
".",
"Values"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/groups_gen.go#L756-L771 |
152,856 | lestrrat/go-slack | groups_gen.go | Mark | func (s *GroupsService) Mark(channel string, timestamp string) *GroupsMarkCall {
var call GroupsMarkCall
call.service = s
call.channel = channel
call.timestamp = timestamp
return &call
} | go | func (s *GroupsService) Mark(channel string, timestamp string) *GroupsMarkCall {
var call GroupsMarkCall
call.service = s
call.channel = channel
call.timestamp = timestamp
return &call
} | [
"func",
"(",
"s",
"*",
"GroupsService",
")",
"Mark",
"(",
"channel",
"string",
",",
"timestamp",
"string",
")",
"*",
"GroupsMarkCall",
"{",
"var",
"call",
"GroupsMarkCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"channel",
"=",
"chann... | // Mark creates a GroupsMarkCall object in preparation for accessing the groups.mark endpoint | [
"Mark",
"creates",
"a",
"GroupsMarkCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"groups",
".",
"mark",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/groups_gen.go#L816-L822 |
152,857 | lestrrat/go-slack | groups_gen.go | ValidateArgs | func (c *GroupsMarkCall) ValidateArgs() error {
if len(c.channel) <= 0 {
return errors.New(`required field channel not initialized`)
}
if len(c.timestamp) <= 0 {
return errors.New(`required field timestamp not initialized`)
}
return nil
} | go | func (c *GroupsMarkCall) ValidateArgs() error {
if len(c.channel) <= 0 {
return errors.New(`required field channel not initialized`)
}
if len(c.timestamp) <= 0 {
return errors.New(`required field timestamp not initialized`)
}
return nil
} | [
"func",
"(",
"c",
"*",
"GroupsMarkCall",
")",
"ValidateArgs",
"(",
")",
"error",
"{",
"if",
"len",
"(",
"c",
".",
"channel",
")",
"<=",
"0",
"{",
"return",
"errors",
".",
"New",
"(",
"`required field channel not initialized`",
")",
"\n",
"}",
"\n",
"if",... | // ValidateArgs checks that all required fields are set in the GroupsMarkCall object | [
"ValidateArgs",
"checks",
"that",
"all",
"required",
"fields",
"are",
"set",
"in",
"the",
"GroupsMarkCall",
"object"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/groups_gen.go#L825-L833 |
152,858 | lestrrat/go-slack | groups_gen.go | Open | func (s *GroupsService) Open(channel string) *GroupsOpenCall {
var call GroupsOpenCall
call.service = s
call.channel = channel
return &call
} | go | func (s *GroupsService) Open(channel string) *GroupsOpenCall {
var call GroupsOpenCall
call.service = s
call.channel = channel
return &call
} | [
"func",
"(",
"s",
"*",
"GroupsService",
")",
"Open",
"(",
"channel",
"string",
")",
"*",
"GroupsOpenCall",
"{",
"var",
"call",
"GroupsOpenCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"channel",
"=",
"channel",
"\n",
"return",
"&",
... | // Open creates a GroupsOpenCall object in preparation for accessing the groups.open endpoint | [
"Open",
"creates",
"a",
"GroupsOpenCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"groups",
".",
"open",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/groups_gen.go#L883-L888 |
152,859 | lestrrat/go-slack | groups_gen.go | Rename | func (s *GroupsService) Rename(channel string, name string) *GroupsRenameCall {
var call GroupsRenameCall
call.service = s
call.channel = channel
call.name = name
return &call
} | go | func (s *GroupsService) Rename(channel string, name string) *GroupsRenameCall {
var call GroupsRenameCall
call.service = s
call.channel = channel
call.name = name
return &call
} | [
"func",
"(",
"s",
"*",
"GroupsService",
")",
"Rename",
"(",
"channel",
"string",
",",
"name",
"string",
")",
"*",
"GroupsRenameCall",
"{",
"var",
"call",
"GroupsRenameCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"channel",
"=",
"chan... | // Rename creates a GroupsRenameCall object in preparation for accessing the groups.rename endpoint | [
"Rename",
"creates",
"a",
"GroupsRenameCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"groups",
".",
"rename",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/groups_gen.go#L941-L947 |
152,860 | lestrrat/go-slack | groups_gen.go | ValidateArgs | func (c *GroupsRenameCall) ValidateArgs() error {
if len(c.channel) <= 0 {
return errors.New(`required field channel not initialized`)
}
if len(c.name) <= 0 {
return errors.New(`required field name not initialized`)
}
return nil
} | go | func (c *GroupsRenameCall) ValidateArgs() error {
if len(c.channel) <= 0 {
return errors.New(`required field channel not initialized`)
}
if len(c.name) <= 0 {
return errors.New(`required field name not initialized`)
}
return nil
} | [
"func",
"(",
"c",
"*",
"GroupsRenameCall",
")",
"ValidateArgs",
"(",
")",
"error",
"{",
"if",
"len",
"(",
"c",
".",
"channel",
")",
"<=",
"0",
"{",
"return",
"errors",
".",
"New",
"(",
"`required field channel not initialized`",
")",
"\n",
"}",
"\n",
"if... | // ValidateArgs checks that all required fields are set in the GroupsRenameCall object | [
"ValidateArgs",
"checks",
"that",
"all",
"required",
"fields",
"are",
"set",
"in",
"the",
"GroupsRenameCall",
"object"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/groups_gen.go#L956-L964 |
152,861 | lestrrat/go-slack | groups_gen.go | Values | func (c *GroupsRenameCall) Values() (url.Values, error) {
if err := c.ValidateArgs(); err != nil {
return nil, errors.Wrap(err, `failed validation`)
}
v := url.Values{}
v.Set(`token`, c.service.token)
v.Set("channel", c.channel)
v.Set("name", c.name)
if c.validate {
v.Set("validate", "true")
}
return v, nil
} | go | func (c *GroupsRenameCall) Values() (url.Values, error) {
if err := c.ValidateArgs(); err != nil {
return nil, errors.Wrap(err, `failed validation`)
}
v := url.Values{}
v.Set(`token`, c.service.token)
v.Set("channel", c.channel)
v.Set("name", c.name)
if c.validate {
v.Set("validate", "true")
}
return v, nil
} | [
"func",
"(",
"c",
"*",
"GroupsRenameCall",
")",
"Values",
"(",
")",
"(",
"url",
".",
"Values",
",",
"error",
")",
"{",
"if",
"err",
":=",
"c",
".",
"ValidateArgs",
"(",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"errors",
".",
"Wrap... | // Values returns the GroupsRenameCall object as url.Values | [
"Values",
"returns",
"the",
"GroupsRenameCall",
"object",
"as",
"url",
".",
"Values"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/groups_gen.go#L967-L982 |
152,862 | lestrrat/go-slack | groups_gen.go | Replies | func (s *GroupsService) Replies(channel string, threadTimestamp string) *GroupsRepliesCall {
var call GroupsRepliesCall
call.service = s
call.channel = channel
call.threadTimestamp = threadTimestamp
return &call
} | go | func (s *GroupsService) Replies(channel string, threadTimestamp string) *GroupsRepliesCall {
var call GroupsRepliesCall
call.service = s
call.channel = channel
call.threadTimestamp = threadTimestamp
return &call
} | [
"func",
"(",
"s",
"*",
"GroupsService",
")",
"Replies",
"(",
"channel",
"string",
",",
"threadTimestamp",
"string",
")",
"*",
"GroupsRepliesCall",
"{",
"var",
"call",
"GroupsRepliesCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"channel",
... | // Replies creates a GroupsRepliesCall object in preparation for accessing the groups.replies endpoint | [
"Replies",
"creates",
"a",
"GroupsRepliesCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"groups",
".",
"replies",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/groups_gen.go#L1026-L1032 |
152,863 | lestrrat/go-slack | groups_gen.go | ValidateArgs | func (c *GroupsRepliesCall) ValidateArgs() error {
if len(c.channel) <= 0 {
return errors.New(`required field channel not initialized`)
}
if len(c.threadTimestamp) <= 0 {
return errors.New(`required field threadTimestamp not initialized`)
}
return nil
} | go | func (c *GroupsRepliesCall) ValidateArgs() error {
if len(c.channel) <= 0 {
return errors.New(`required field channel not initialized`)
}
if len(c.threadTimestamp) <= 0 {
return errors.New(`required field threadTimestamp not initialized`)
}
return nil
} | [
"func",
"(",
"c",
"*",
"GroupsRepliesCall",
")",
"ValidateArgs",
"(",
")",
"error",
"{",
"if",
"len",
"(",
"c",
".",
"channel",
")",
"<=",
"0",
"{",
"return",
"errors",
".",
"New",
"(",
"`required field channel not initialized`",
")",
"\n",
"}",
"\n",
"i... | // ValidateArgs checks that all required fields are set in the GroupsRepliesCall object | [
"ValidateArgs",
"checks",
"that",
"all",
"required",
"fields",
"are",
"set",
"in",
"the",
"GroupsRepliesCall",
"object"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/groups_gen.go#L1035-L1043 |
152,864 | lestrrat/go-slack | groups_gen.go | SetPurpose | func (s *GroupsService) SetPurpose(channel string, purpose string) *GroupsSetPurposeCall {
var call GroupsSetPurposeCall
call.service = s
call.channel = channel
call.purpose = purpose
return &call
} | go | func (s *GroupsService) SetPurpose(channel string, purpose string) *GroupsSetPurposeCall {
var call GroupsSetPurposeCall
call.service = s
call.channel = channel
call.purpose = purpose
return &call
} | [
"func",
"(",
"s",
"*",
"GroupsService",
")",
"SetPurpose",
"(",
"channel",
"string",
",",
"purpose",
"string",
")",
"*",
"GroupsSetPurposeCall",
"{",
"var",
"call",
"GroupsSetPurposeCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"channel",... | // SetPurpose creates a GroupsSetPurposeCall object in preparation for accessing the groups.setPurpose endpoint | [
"SetPurpose",
"creates",
"a",
"GroupsSetPurposeCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"groups",
".",
"setPurpose",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/groups_gen.go#L1095-L1101 |
152,865 | lestrrat/go-slack | groups_gen.go | ValidateArgs | func (c *GroupsSetPurposeCall) ValidateArgs() error {
if len(c.channel) <= 0 {
return errors.New(`required field channel not initialized`)
}
if len(c.purpose) <= 0 {
return errors.New(`required field purpose not initialized`)
}
return nil
} | go | func (c *GroupsSetPurposeCall) ValidateArgs() error {
if len(c.channel) <= 0 {
return errors.New(`required field channel not initialized`)
}
if len(c.purpose) <= 0 {
return errors.New(`required field purpose not initialized`)
}
return nil
} | [
"func",
"(",
"c",
"*",
"GroupsSetPurposeCall",
")",
"ValidateArgs",
"(",
")",
"error",
"{",
"if",
"len",
"(",
"c",
".",
"channel",
")",
"<=",
"0",
"{",
"return",
"errors",
".",
"New",
"(",
"`required field channel not initialized`",
")",
"\n",
"}",
"\n",
... | // ValidateArgs checks that all required fields are set in the GroupsSetPurposeCall object | [
"ValidateArgs",
"checks",
"that",
"all",
"required",
"fields",
"are",
"set",
"in",
"the",
"GroupsSetPurposeCall",
"object"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/groups_gen.go#L1104-L1112 |
152,866 | lestrrat/go-slack | groups_gen.go | SetTopic | func (s *GroupsService) SetTopic(channel string, topic string) *GroupsSetTopicCall {
var call GroupsSetTopicCall
call.service = s
call.channel = channel
call.topic = topic
return &call
} | go | func (s *GroupsService) SetTopic(channel string, topic string) *GroupsSetTopicCall {
var call GroupsSetTopicCall
call.service = s
call.channel = channel
call.topic = topic
return &call
} | [
"func",
"(",
"s",
"*",
"GroupsService",
")",
"SetTopic",
"(",
"channel",
"string",
",",
"topic",
"string",
")",
"*",
"GroupsSetTopicCall",
"{",
"var",
"call",
"GroupsSetTopicCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"channel",
"=",
... | // SetTopic creates a GroupsSetTopicCall object in preparation for accessing the groups.setTopic endpoint | [
"SetTopic",
"creates",
"a",
"GroupsSetTopicCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"groups",
".",
"setTopic",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/groups_gen.go#L1163-L1169 |
152,867 | lestrrat/go-slack | groups_gen.go | ValidateArgs | func (c *GroupsSetTopicCall) ValidateArgs() error {
if len(c.channel) <= 0 {
return errors.New(`required field channel not initialized`)
}
if len(c.topic) <= 0 {
return errors.New(`required field topic not initialized`)
}
return nil
} | go | func (c *GroupsSetTopicCall) ValidateArgs() error {
if len(c.channel) <= 0 {
return errors.New(`required field channel not initialized`)
}
if len(c.topic) <= 0 {
return errors.New(`required field topic not initialized`)
}
return nil
} | [
"func",
"(",
"c",
"*",
"GroupsSetTopicCall",
")",
"ValidateArgs",
"(",
")",
"error",
"{",
"if",
"len",
"(",
"c",
".",
"channel",
")",
"<=",
"0",
"{",
"return",
"errors",
".",
"New",
"(",
"`required field channel not initialized`",
")",
"\n",
"}",
"\n",
"... | // ValidateArgs checks that all required fields are set in the GroupsSetTopicCall object | [
"ValidateArgs",
"checks",
"that",
"all",
"required",
"fields",
"are",
"set",
"in",
"the",
"GroupsSetTopicCall",
"object"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/groups_gen.go#L1172-L1180 |
152,868 | lestrrat/go-slack | groups_gen.go | Unarchive | func (s *GroupsService) Unarchive(channel string) *GroupsUnarchiveCall {
var call GroupsUnarchiveCall
call.service = s
call.channel = channel
return &call
} | go | func (s *GroupsService) Unarchive(channel string) *GroupsUnarchiveCall {
var call GroupsUnarchiveCall
call.service = s
call.channel = channel
return &call
} | [
"func",
"(",
"s",
"*",
"GroupsService",
")",
"Unarchive",
"(",
"channel",
"string",
")",
"*",
"GroupsUnarchiveCall",
"{",
"var",
"call",
"GroupsUnarchiveCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"channel",
"=",
"channel",
"\n",
"ret... | // Unarchive creates a GroupsUnarchiveCall object in preparation for accessing the groups.unarchive endpoint | [
"Unarchive",
"creates",
"a",
"GroupsUnarchiveCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"groups",
".",
"unarchive",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/groups_gen.go#L1231-L1236 |
152,869 | lestrrat/go-slack | rtm/option.go | WithPingInterval | func WithPingInterval(t time.Duration) Option {
return &option{
name: pingIntervalKey,
value: t,
}
} | go | func WithPingInterval(t time.Duration) Option {
return &option{
name: pingIntervalKey,
value: t,
}
} | [
"func",
"WithPingInterval",
"(",
"t",
"time",
".",
"Duration",
")",
"Option",
"{",
"return",
"&",
"option",
"{",
"name",
":",
"pingIntervalKey",
",",
"value",
":",
"t",
",",
"}",
"\n",
"}"
] | // WithPingInterval creates a new option that defines the length of
// intervals between each successive pings. | [
"WithPingInterval",
"creates",
"a",
"new",
"option",
"that",
"defines",
"the",
"length",
"of",
"intervals",
"between",
"each",
"successive",
"pings",
"."
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/rtm/option.go#L11-L16 |
152,870 | lestrrat/go-slack | rtm/option.go | WithBackOffStrategy | func WithBackOffStrategy(b backoff.BackOff) Option {
return &option{
name: backoffStrategyKey,
value: b,
}
} | go | func WithBackOffStrategy(b backoff.BackOff) Option {
return &option{
name: backoffStrategyKey,
value: b,
}
} | [
"func",
"WithBackOffStrategy",
"(",
"b",
"backoff",
".",
"BackOff",
")",
"Option",
"{",
"return",
"&",
"option",
"{",
"name",
":",
"backoffStrategyKey",
",",
"value",
":",
"b",
",",
"}",
"\n",
"}"
] | // WithBackOffStrategy creates a new option that defines the
// backoff strategy to be used when connections to the slack
// RTM server fails. | [
"WithBackOffStrategy",
"creates",
"a",
"new",
"option",
"that",
"defines",
"the",
"backoff",
"strategy",
"to",
"be",
"used",
"when",
"connections",
"to",
"the",
"slack",
"RTM",
"server",
"fails",
"."
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/rtm/option.go#L21-L26 |
152,871 | layeh/asar | decoder.go | Decode | func Decode(ra io.ReaderAt) (*Entry, error) {
headerSize := uint32(0)
headerStringSize := uint32(0)
// [pickle object header (4 bytes) == 4]
// [pickle uint32 = $header_object_size]
{
var buff [8]byte
if n, _ := ra.ReadAt(buff[:], 0); n != 8 {
return nil, errMalformed
}
dataSize := binary.LittleEndian.Uint32(buff[:4])
if dataSize != 4 {
return nil, errMalformed
}
headerSize = binary.LittleEndian.Uint32(buff[4:8])
}
// [pickle object header (4 bytes)]
// [pickle data header (4 bytes) == $string_size]
// [pickle string ($string_size bytes)]
{
var buff [8]byte
if n, _ := ra.ReadAt(buff[:], 8); n != 8 {
return nil, errMalformed
}
headerObjectSize := binary.LittleEndian.Uint32(buff[:4])
if headerObjectSize != headerSize-4 {
return nil, errMalformed
}
headerStringSize = binary.LittleEndian.Uint32(buff[4:8])
}
// read header string
headerSection := io.NewSectionReader(ra, 8+8, int64(headerStringSize))
baseOffset := 8 + int64(headerSize)
baseOffset += baseOffset % 4 // pickle objects are uint32 aligned
root, err := decodeHeader(ra, headerSection, baseOffset)
if err != nil {
return nil, err
}
return root, nil
} | go | func Decode(ra io.ReaderAt) (*Entry, error) {
headerSize := uint32(0)
headerStringSize := uint32(0)
// [pickle object header (4 bytes) == 4]
// [pickle uint32 = $header_object_size]
{
var buff [8]byte
if n, _ := ra.ReadAt(buff[:], 0); n != 8 {
return nil, errMalformed
}
dataSize := binary.LittleEndian.Uint32(buff[:4])
if dataSize != 4 {
return nil, errMalformed
}
headerSize = binary.LittleEndian.Uint32(buff[4:8])
}
// [pickle object header (4 bytes)]
// [pickle data header (4 bytes) == $string_size]
// [pickle string ($string_size bytes)]
{
var buff [8]byte
if n, _ := ra.ReadAt(buff[:], 8); n != 8 {
return nil, errMalformed
}
headerObjectSize := binary.LittleEndian.Uint32(buff[:4])
if headerObjectSize != headerSize-4 {
return nil, errMalformed
}
headerStringSize = binary.LittleEndian.Uint32(buff[4:8])
}
// read header string
headerSection := io.NewSectionReader(ra, 8+8, int64(headerStringSize))
baseOffset := 8 + int64(headerSize)
baseOffset += baseOffset % 4 // pickle objects are uint32 aligned
root, err := decodeHeader(ra, headerSection, baseOffset)
if err != nil {
return nil, err
}
return root, nil
} | [
"func",
"Decode",
"(",
"ra",
"io",
".",
"ReaderAt",
")",
"(",
"*",
"Entry",
",",
"error",
")",
"{",
"headerSize",
":=",
"uint32",
"(",
"0",
")",
"\n",
"headerStringSize",
":=",
"uint32",
"(",
"0",
")",
"\n\n",
"// [pickle object header (4 bytes) == 4]",
"/... | // Decode decodes the ASAR archive in ra.
//
// Returns the root element and nil on success. nil and an error is returned on
// failure. | [
"Decode",
"decodes",
"the",
"ASAR",
"archive",
"in",
"ra",
".",
"Returns",
"the",
"root",
"element",
"and",
"nil",
"on",
"success",
".",
"nil",
"and",
"an",
"error",
"is",
"returned",
"on",
"failure",
"."
] | bf07d1986b90c7d2ad63393e73e9390eeb510753 | https://github.com/layeh/asar/blob/bf07d1986b90c7d2ad63393e73e9390eeb510753/decoder.go#L17-L64 |
152,872 | michiwend/gomusicbrainz | annotation.go | ResultsWithScore | func (r *AnnotationSearchResponse) ResultsWithScore(score int) []*Annotation {
var res []*Annotation
for _, v := range r.Annotations {
if r.Scores[v] >= score {
res = append(res, v)
}
}
return res
} | go | func (r *AnnotationSearchResponse) ResultsWithScore(score int) []*Annotation {
var res []*Annotation
for _, v := range r.Annotations {
if r.Scores[v] >= score {
res = append(res, v)
}
}
return res
} | [
"func",
"(",
"r",
"*",
"AnnotationSearchResponse",
")",
"ResultsWithScore",
"(",
"score",
"int",
")",
"[",
"]",
"*",
"Annotation",
"{",
"var",
"res",
"[",
"]",
"*",
"Annotation",
"\n",
"for",
"_",
",",
"v",
":=",
"range",
"r",
".",
"Annotations",
"{",
... | // ResultsWithScore returns a slice of Annotations with a min score. | [
"ResultsWithScore",
"returns",
"a",
"slice",
"of",
"Annotations",
"with",
"a",
"min",
"score",
"."
] | 6c07e13dd396ba10bd9f8904be5018df94472839 | https://github.com/michiwend/gomusicbrainz/blob/6c07e13dd396ba10bd9f8904be5018df94472839/annotation.go#L75-L83 |
152,873 | layeh/asar | encoder.go | EncodeTo | func (e *Entry) EncodeTo(w io.Writer) (n int64, err error) {
defer func() {
if r := recover(); r != nil {
if e := r.(error); e != nil {
err = e
} else {
panic(r)
}
}
}()
encoder := entryEncoder{}
{
var reserve [16]byte
encoder.Header.Write(reserve[:])
}
encoder.Encoder = json.NewEncoder(&encoder.Header)
if err = encoder.Encode(e); err != nil {
return
}
{
var padding [3]byte
encoder.Header.Write(padding[:encoder.Header.Len()%4])
}
header := encoder.Header.Bytes()
binary.LittleEndian.PutUint32(header[:4], 4)
binary.LittleEndian.PutUint32(header[4:8], 8+uint32(encoder.Header.Len()))
binary.LittleEndian.PutUint32(header[8:12], 4+uint32(encoder.Header.Len()))
binary.LittleEndian.PutUint32(header[12:16], uint32(encoder.Header.Len()))
n, err = encoder.Header.WriteTo(w)
if err != nil {
return
}
for _, chunk := range encoder.Contents {
var written int64
written, err = io.Copy(w, chunk)
n += written
if err != nil {
return
}
}
return
} | go | func (e *Entry) EncodeTo(w io.Writer) (n int64, err error) {
defer func() {
if r := recover(); r != nil {
if e := r.(error); e != nil {
err = e
} else {
panic(r)
}
}
}()
encoder := entryEncoder{}
{
var reserve [16]byte
encoder.Header.Write(reserve[:])
}
encoder.Encoder = json.NewEncoder(&encoder.Header)
if err = encoder.Encode(e); err != nil {
return
}
{
var padding [3]byte
encoder.Header.Write(padding[:encoder.Header.Len()%4])
}
header := encoder.Header.Bytes()
binary.LittleEndian.PutUint32(header[:4], 4)
binary.LittleEndian.PutUint32(header[4:8], 8+uint32(encoder.Header.Len()))
binary.LittleEndian.PutUint32(header[8:12], 4+uint32(encoder.Header.Len()))
binary.LittleEndian.PutUint32(header[12:16], uint32(encoder.Header.Len()))
n, err = encoder.Header.WriteTo(w)
if err != nil {
return
}
for _, chunk := range encoder.Contents {
var written int64
written, err = io.Copy(w, chunk)
n += written
if err != nil {
return
}
}
return
} | [
"func",
"(",
"e",
"*",
"Entry",
")",
"EncodeTo",
"(",
"w",
"io",
".",
"Writer",
")",
"(",
"n",
"int64",
",",
"err",
"error",
")",
"{",
"defer",
"func",
"(",
")",
"{",
"if",
"r",
":=",
"recover",
"(",
")",
";",
"r",
"!=",
"nil",
"{",
"if",
"... | // EncodeTo writes an ASAR archive containing Entry's descendants. This function
// is usally called on the root entry. | [
"EncodeTo",
"writes",
"an",
"ASAR",
"archive",
"containing",
"Entry",
"s",
"descendants",
".",
"This",
"function",
"is",
"usally",
"called",
"on",
"the",
"root",
"entry",
"."
] | bf07d1986b90c7d2ad63393e73e9390eeb510753 | https://github.com/layeh/asar/blob/bf07d1986b90c7d2ad63393e73e9390eeb510753/encoder.go#L73-L122 |
152,874 | lestrrat/go-slack | users_profile_gen.go | IncludeLabels | func (c *UsersProfileGetCall) IncludeLabels(includeLabels bool) *UsersProfileGetCall {
c.includeLabels = includeLabels
return c
} | go | func (c *UsersProfileGetCall) IncludeLabels(includeLabels bool) *UsersProfileGetCall {
c.includeLabels = includeLabels
return c
} | [
"func",
"(",
"c",
"*",
"UsersProfileGetCall",
")",
"IncludeLabels",
"(",
"includeLabels",
"bool",
")",
"*",
"UsersProfileGetCall",
"{",
"c",
".",
"includeLabels",
"=",
"includeLabels",
"\n",
"return",
"c",
"\n",
"}"
] | // IncludeLabels sets the value for optional includeLabels parameter | [
"IncludeLabels",
"sets",
"the",
"value",
"for",
"optional",
"includeLabels",
"parameter"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/users_profile_gen.go#L43-L46 |
152,875 | lestrrat/go-slack | users_profile_gen.go | Values | func (c *UsersProfileGetCall) Values() (url.Values, error) {
if err := c.ValidateArgs(); err != nil {
return nil, errors.Wrap(err, `failed validation`)
}
v := url.Values{}
v.Set(`token`, c.service.token)
if c.includeLabels {
v.Set("include_labels", "true")
}
if len(c.user) > 0 {
v.Set("user", c.user)
}
return v, nil
} | go | func (c *UsersProfileGetCall) Values() (url.Values, error) {
if err := c.ValidateArgs(); err != nil {
return nil, errors.Wrap(err, `failed validation`)
}
v := url.Values{}
v.Set(`token`, c.service.token)
if c.includeLabels {
v.Set("include_labels", "true")
}
if len(c.user) > 0 {
v.Set("user", c.user)
}
return v, nil
} | [
"func",
"(",
"c",
"*",
"UsersProfileGetCall",
")",
"Values",
"(",
")",
"(",
"url",
".",
"Values",
",",
"error",
")",
"{",
"if",
"err",
":=",
"c",
".",
"ValidateArgs",
"(",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"errors",
".",
"W... | // Values returns the UsersProfileGetCall object as url.Values | [
"Values",
"returns",
"the",
"UsersProfileGetCall",
"object",
"as",
"url",
".",
"Values"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/users_profile_gen.go#L60-L75 |
152,876 | lestrrat/go-slack | users_profile_gen.go | Set | func (s *UsersProfileService) Set() *UsersProfileSetCall {
var call UsersProfileSetCall
call.service = s
return &call
} | go | func (s *UsersProfileService) Set() *UsersProfileSetCall {
var call UsersProfileSetCall
call.service = s
return &call
} | [
"func",
"(",
"s",
"*",
"UsersProfileService",
")",
"Set",
"(",
")",
"*",
"UsersProfileSetCall",
"{",
"var",
"call",
"UsersProfileSetCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"return",
"&",
"call",
"\n",
"}"
] | // Set creates a UsersProfileSetCall object in preparation for accessing the users.profile.set endpoint | [
"Set",
"creates",
"a",
"UsersProfileSetCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"users",
".",
"profile",
".",
"set",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/users_profile_gen.go#L116-L120 |
152,877 | lestrrat/go-slack | users_profile_gen.go | Profile | func (c *UsersProfileSetCall) Profile(profile *objects.UserProfile) *UsersProfileSetCall {
c.profile = profile
return c
} | go | func (c *UsersProfileSetCall) Profile(profile *objects.UserProfile) *UsersProfileSetCall {
c.profile = profile
return c
} | [
"func",
"(",
"c",
"*",
"UsersProfileSetCall",
")",
"Profile",
"(",
"profile",
"*",
"objects",
".",
"UserProfile",
")",
"*",
"UsersProfileSetCall",
"{",
"c",
".",
"profile",
"=",
"profile",
"\n",
"return",
"c",
"\n",
"}"
] | // Profile sets the value for optional profile parameter | [
"Profile",
"sets",
"the",
"value",
"for",
"optional",
"profile",
"parameter"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/users_profile_gen.go#L129-L132 |
152,878 | lestrrat/go-slack | users_profile_gen.go | Value | func (c *UsersProfileSetCall) Value(value string) *UsersProfileSetCall {
c.value = value
return c
} | go | func (c *UsersProfileSetCall) Value(value string) *UsersProfileSetCall {
c.value = value
return c
} | [
"func",
"(",
"c",
"*",
"UsersProfileSetCall",
")",
"Value",
"(",
"value",
"string",
")",
"*",
"UsersProfileSetCall",
"{",
"c",
".",
"value",
"=",
"value",
"\n",
"return",
"c",
"\n",
"}"
] | // Value sets the value for optional value parameter | [
"Value",
"sets",
"the",
"value",
"for",
"optional",
"value",
"parameter"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/users_profile_gen.go#L141-L144 |
152,879 | lestrrat/go-slack | users_profile_gen.go | Values | func (c *UsersProfileSetCall) Values() (url.Values, error) {
if err := c.ValidateArgs(); err != nil {
return nil, errors.Wrap(err, `failed validation`)
}
v := url.Values{}
v.Set(`token`, c.service.token)
if len(c.name) > 0 {
v.Set("name", c.name)
}
if c.profile != nil {
profileEncoded, err := c.profile.Encode()
if err != nil {
return nil, errors.Wrap(err, `failed to encode field`)
}
v.Set("profile", profileEncoded)
}
if len(c.user) > 0 {
v.Set("user", c.user)
}
if len(c.value) > 0 {
v.Set("value", c.value)
}
return v, nil
} | go | func (c *UsersProfileSetCall) Values() (url.Values, error) {
if err := c.ValidateArgs(); err != nil {
return nil, errors.Wrap(err, `failed validation`)
}
v := url.Values{}
v.Set(`token`, c.service.token)
if len(c.name) > 0 {
v.Set("name", c.name)
}
if c.profile != nil {
profileEncoded, err := c.profile.Encode()
if err != nil {
return nil, errors.Wrap(err, `failed to encode field`)
}
v.Set("profile", profileEncoded)
}
if len(c.user) > 0 {
v.Set("user", c.user)
}
if len(c.value) > 0 {
v.Set("value", c.value)
}
return v, nil
} | [
"func",
"(",
"c",
"*",
"UsersProfileSetCall",
")",
"Values",
"(",
")",
"(",
"url",
".",
"Values",
",",
"error",
")",
"{",
"if",
"err",
":=",
"c",
".",
"ValidateArgs",
"(",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"errors",
".",
"W... | // Values returns the UsersProfileSetCall object as url.Values | [
"Values",
"returns",
"the",
"UsersProfileSetCall",
"object",
"as",
"url",
".",
"Values"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/users_profile_gen.go#L152-L179 |
152,880 | lestrrat/go-slack | client.go | New | func New(token string, options ...Option) *Client {
slackURL := DefaultAPIEndpoint
httpcl := http.DefaultClient
debug, _ := strconv.ParseBool(os.Getenv("SLACK_DEBUG"))
var logger Logger = nilLogger{}
for _, o := range options {
switch o.Name() {
case httpclkey:
httpcl = o.Value().(*http.Client)
case debugkey:
debug = o.Value().(bool)
case loggerkey:
logger = o.Value().(Logger)
case slackurlkey:
slackURL = o.Value().(string)
}
}
if !strings.HasSuffix(slackURL, "/") {
slackURL = slackURL + "/"
}
if _, ok := logger.(nilLogger); debug && ok {
logger = traceLogger{dst: os.Stderr}
}
wrappedcl := &httpClient{
client: httpcl,
debug: debug,
slackURL: slackURL,
logger: logger,
}
return &Client{
auth: &AuthService{client: wrappedcl, token: token},
bots: &BotsService{client: wrappedcl, token: token},
channels: &ChannelsService{client: wrappedcl, token: token},
chat: &ChatService{client: wrappedcl, token: token},
dialog: &DialogService{client: wrappedcl, token: token},
emoji: &EmojiService{client: wrappedcl, token: token},
groups: &GroupsService{client: wrappedcl, token: token},
oauth: &OAuthService{client: wrappedcl},
reminders: &RemindersService{client: wrappedcl, token: token},
reactions: &ReactionsService{client: wrappedcl, token: token},
rtm: &RTMService{client: wrappedcl, token: token},
users: &UsersService{client: wrappedcl, token: token},
usersProfile: &UsersProfileService{client: wrappedcl, token: token},
usergroups: &UsergroupsService{client: wrappedcl, token: token},
usergroupsUsers: &UsergroupsUsersService{client: wrappedcl, token: token},
debug: debug,
}
} | go | func New(token string, options ...Option) *Client {
slackURL := DefaultAPIEndpoint
httpcl := http.DefaultClient
debug, _ := strconv.ParseBool(os.Getenv("SLACK_DEBUG"))
var logger Logger = nilLogger{}
for _, o := range options {
switch o.Name() {
case httpclkey:
httpcl = o.Value().(*http.Client)
case debugkey:
debug = o.Value().(bool)
case loggerkey:
logger = o.Value().(Logger)
case slackurlkey:
slackURL = o.Value().(string)
}
}
if !strings.HasSuffix(slackURL, "/") {
slackURL = slackURL + "/"
}
if _, ok := logger.(nilLogger); debug && ok {
logger = traceLogger{dst: os.Stderr}
}
wrappedcl := &httpClient{
client: httpcl,
debug: debug,
slackURL: slackURL,
logger: logger,
}
return &Client{
auth: &AuthService{client: wrappedcl, token: token},
bots: &BotsService{client: wrappedcl, token: token},
channels: &ChannelsService{client: wrappedcl, token: token},
chat: &ChatService{client: wrappedcl, token: token},
dialog: &DialogService{client: wrappedcl, token: token},
emoji: &EmojiService{client: wrappedcl, token: token},
groups: &GroupsService{client: wrappedcl, token: token},
oauth: &OAuthService{client: wrappedcl},
reminders: &RemindersService{client: wrappedcl, token: token},
reactions: &ReactionsService{client: wrappedcl, token: token},
rtm: &RTMService{client: wrappedcl, token: token},
users: &UsersService{client: wrappedcl, token: token},
usersProfile: &UsersProfileService{client: wrappedcl, token: token},
usergroups: &UsergroupsService{client: wrappedcl, token: token},
usergroupsUsers: &UsergroupsUsersService{client: wrappedcl, token: token},
debug: debug,
}
} | [
"func",
"New",
"(",
"token",
"string",
",",
"options",
"...",
"Option",
")",
"*",
"Client",
"{",
"slackURL",
":=",
"DefaultAPIEndpoint",
"\n",
"httpcl",
":=",
"http",
".",
"DefaultClient",
"\n",
"debug",
",",
"_",
":=",
"strconv",
".",
"ParseBool",
"(",
... | // New creates a new REST Slack API client. The `token` is
// required. Other optional parameters can be passed using the
// various `WithXXXX` functions | [
"New",
"creates",
"a",
"new",
"REST",
"Slack",
"API",
"client",
".",
"The",
"token",
"is",
"required",
".",
"Other",
"optional",
"parameters",
"can",
"be",
"passed",
"using",
"the",
"various",
"WithXXXX",
"functions"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/client.go#L34-L84 |
152,881 | lestrrat/go-slack | client.go | parseResponse | func (c *httpClient) parseResponse(ctx context.Context, path string, rdr io.Reader, res interface{}) error {
if c.debug {
var buf bytes.Buffer
io.Copy(&buf, rdr)
c.logger.Debugf(ctx, "-----> %s (response)", path)
var m map[string]interface{}
if err := json.Unmarshal(buf.Bytes(), &m); err != nil {
c.logger.Debugf(ctx, "failed to unmarshal payload: %s", err)
c.logger.Debugf(ctx, buf.String())
} else {
formatted, _ := json.MarshalIndent(m, "", " ")
c.logger.Debugf(ctx, "%s", formatted)
}
c.logger.Debugf(ctx, "<----- %s (response)", path)
rdr = &buf
}
return json.NewDecoder(rdr).Decode(res)
} | go | func (c *httpClient) parseResponse(ctx context.Context, path string, rdr io.Reader, res interface{}) error {
if c.debug {
var buf bytes.Buffer
io.Copy(&buf, rdr)
c.logger.Debugf(ctx, "-----> %s (response)", path)
var m map[string]interface{}
if err := json.Unmarshal(buf.Bytes(), &m); err != nil {
c.logger.Debugf(ctx, "failed to unmarshal payload: %s", err)
c.logger.Debugf(ctx, buf.String())
} else {
formatted, _ := json.MarshalIndent(m, "", " ")
c.logger.Debugf(ctx, "%s", formatted)
}
c.logger.Debugf(ctx, "<----- %s (response)", path)
rdr = &buf
}
return json.NewDecoder(rdr).Decode(res)
} | [
"func",
"(",
"c",
"*",
"httpClient",
")",
"parseResponse",
"(",
"ctx",
"context",
".",
"Context",
",",
"path",
"string",
",",
"rdr",
"io",
".",
"Reader",
",",
"res",
"interface",
"{",
"}",
")",
"error",
"{",
"if",
"c",
".",
"debug",
"{",
"var",
"bu... | // path is only passed for debugging purposes | [
"path",
"is",
"only",
"passed",
"for",
"debugging",
"purposes"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/client.go#L173-L191 |
152,882 | layeh/asar | builder.go | AddString | func (b *Builder) AddString(name, contents string, flags Flag) *Builder {
return b.Add(name, strings.NewReader(contents), int64(len(contents)), flags)
} | go | func (b *Builder) AddString(name, contents string, flags Flag) *Builder {
return b.Add(name, strings.NewReader(contents), int64(len(contents)), flags)
} | [
"func",
"(",
"b",
"*",
"Builder",
")",
"AddString",
"(",
"name",
",",
"contents",
"string",
",",
"flags",
"Flag",
")",
"*",
"Builder",
"{",
"return",
"b",
".",
"Add",
"(",
"name",
",",
"strings",
".",
"NewReader",
"(",
"contents",
")",
",",
"int64",
... | // AddString adds a new file Entry whose contents are the given string. | [
"AddString",
"adds",
"a",
"new",
"file",
"Entry",
"whose",
"contents",
"are",
"the",
"given",
"string",
"."
] | bf07d1986b90c7d2ad63393e73e9390eeb510753 | https://github.com/layeh/asar/blob/bf07d1986b90c7d2ad63393e73e9390eeb510753/builder.go#L46-L48 |
152,883 | layeh/asar | builder.go | Add | func (b *Builder) Add(name string, ra io.ReaderAt, size int64, flags Flag) *Builder {
b.init()
child := &Entry{
Name: name,
Size: size,
Flags: flags,
Parent: b.current,
r: ra,
}
b.current.Children = append(b.current.Children, child)
return b
} | go | func (b *Builder) Add(name string, ra io.ReaderAt, size int64, flags Flag) *Builder {
b.init()
child := &Entry{
Name: name,
Size: size,
Flags: flags,
Parent: b.current,
r: ra,
}
b.current.Children = append(b.current.Children, child)
return b
} | [
"func",
"(",
"b",
"*",
"Builder",
")",
"Add",
"(",
"name",
"string",
",",
"ra",
"io",
".",
"ReaderAt",
",",
"size",
"int64",
",",
"flags",
"Flag",
")",
"*",
"Builder",
"{",
"b",
".",
"init",
"(",
")",
"\n\n",
"child",
":=",
"&",
"Entry",
"{",
"... | // Add adds a new file Entry. | [
"Add",
"adds",
"a",
"new",
"file",
"Entry",
"."
] | bf07d1986b90c7d2ad63393e73e9390eeb510753 | https://github.com/layeh/asar/blob/bf07d1986b90c7d2ad63393e73e9390eeb510753/builder.go#L51-L65 |
152,884 | layeh/asar | builder.go | AddDir | func (b *Builder) AddDir(name string, flags Flag) *Builder {
b.init()
child := &Entry{
Name: name,
Flags: flags | FlagDir,
Parent: b.current,
}
b.current.Children = append(b.current.Children, child)
b.current = child
return b
} | go | func (b *Builder) AddDir(name string, flags Flag) *Builder {
b.init()
child := &Entry{
Name: name,
Flags: flags | FlagDir,
Parent: b.current,
}
b.current.Children = append(b.current.Children, child)
b.current = child
return b
} | [
"func",
"(",
"b",
"*",
"Builder",
")",
"AddDir",
"(",
"name",
"string",
",",
"flags",
"Flag",
")",
"*",
"Builder",
"{",
"b",
".",
"init",
"(",
")",
"\n\n",
"child",
":=",
"&",
"Entry",
"{",
"Name",
":",
"name",
",",
"Flags",
":",
"flags",
"|",
... | // AddDir adds a new directory Entry. The active Entry is switched to this newly
// added Entry. | [
"AddDir",
"adds",
"a",
"new",
"directory",
"Entry",
".",
"The",
"active",
"Entry",
"is",
"switched",
"to",
"this",
"newly",
"added",
"Entry",
"."
] | bf07d1986b90c7d2ad63393e73e9390eeb510753 | https://github.com/layeh/asar/blob/bf07d1986b90c7d2ad63393e73e9390eeb510753/builder.go#L69-L82 |
152,885 | mixer/fsm | blueprint.go | From | func (b *Blueprint) From(start uint8) *Transition {
return (&Transition{blueprint: b}).From(start)
} | go | func (b *Blueprint) From(start uint8) *Transition {
return (&Transition{blueprint: b}).From(start)
} | [
"func",
"(",
"b",
"*",
"Blueprint",
")",
"From",
"(",
"start",
"uint8",
")",
"*",
"Transition",
"{",
"return",
"(",
"&",
"Transition",
"{",
"blueprint",
":",
"b",
"}",
")",
".",
"From",
"(",
"start",
")",
"\n",
"}"
] | // From returns a new transition for the blueprint.
// The transition will be added to the blueprint automatically when it has both
// "from" and "to" values. | [
"From",
"returns",
"a",
"new",
"transition",
"for",
"the",
"blueprint",
".",
"The",
"transition",
"will",
"be",
"added",
"to",
"the",
"blueprint",
"automatically",
"when",
"it",
"has",
"both",
"from",
"and",
"to",
"values",
"."
] | 40bf467cb298150fc847ee18ddda4c4f1fa2df35 | https://github.com/mixer/fsm/blob/40bf467cb298150fc847ee18ddda4c4f1fa2df35/blueprint.go#L18-L20 |
152,886 | mixer/fsm | blueprint.go | Add | func (b *Blueprint) Add(t *Transition) {
idx := b.transitions.InsertPos(t)
trans := make(list, len(b.transitions)+1)
copy(trans, b.transitions[:idx])
copy(trans[idx+1:], b.transitions[idx:])
trans[idx] = t
b.transitions = trans
} | go | func (b *Blueprint) Add(t *Transition) {
idx := b.transitions.InsertPos(t)
trans := make(list, len(b.transitions)+1)
copy(trans, b.transitions[:idx])
copy(trans[idx+1:], b.transitions[idx:])
trans[idx] = t
b.transitions = trans
} | [
"func",
"(",
"b",
"*",
"Blueprint",
")",
"Add",
"(",
"t",
"*",
"Transition",
")",
"{",
"idx",
":=",
"b",
".",
"transitions",
".",
"InsertPos",
"(",
"t",
")",
"\n",
"trans",
":=",
"make",
"(",
"list",
",",
"len",
"(",
"b",
".",
"transitions",
")",... | // Add adds a complete transition to the blueprint. | [
"Add",
"adds",
"a",
"complete",
"transition",
"to",
"the",
"blueprint",
"."
] | 40bf467cb298150fc847ee18ddda4c4f1fa2df35 | https://github.com/mixer/fsm/blob/40bf467cb298150fc847ee18ddda4c4f1fa2df35/blueprint.go#L23-L31 |
152,887 | mixer/fsm | blueprint.go | Machine | func (b *Blueprint) Machine() *Machine {
fsm := &Machine{
state: b.start,
transitions: b.transitions,
}
return fsm
} | go | func (b *Blueprint) Machine() *Machine {
fsm := &Machine{
state: b.start,
transitions: b.transitions,
}
return fsm
} | [
"func",
"(",
"b",
"*",
"Blueprint",
")",
"Machine",
"(",
")",
"*",
"Machine",
"{",
"fsm",
":=",
"&",
"Machine",
"{",
"state",
":",
"b",
".",
"start",
",",
"transitions",
":",
"b",
".",
"transitions",
",",
"}",
"\n\n",
"return",
"fsm",
"\n",
"}"
] | // Machine returns a new machine created from the blueprint. | [
"Machine",
"returns",
"a",
"new",
"machine",
"created",
"from",
"the",
"blueprint",
"."
] | 40bf467cb298150fc847ee18ddda4c4f1fa2df35 | https://github.com/mixer/fsm/blob/40bf467cb298150fc847ee18ddda4c4f1fa2df35/blueprint.go#L39-L46 |
152,888 | pivotal-cf/graphite-nozzle | processors/http_start_stop_processor.go | parseEventUri | func (p *HttpStartStopProcessor) parseEventUri(uri string) string {
hostname := ""
//we first remove the scheme
if strings.Contains(uri, "://") {
uri = strings.Split(uri, "://")[1]
}
//and then proceed with extracting the hostname
hostname = strings.Split(uri, "/")[0]
hostname = strings.Replace(hostname, ".", "_", -1)
hostname = strings.Replace(hostname, ":", "_", -1)
if !(len(hostname) > 0) {
panic(errors.New("Hostname cannot be extracted from Event uri: " + uri))
}
return hostname
} | go | func (p *HttpStartStopProcessor) parseEventUri(uri string) string {
hostname := ""
//we first remove the scheme
if strings.Contains(uri, "://") {
uri = strings.Split(uri, "://")[1]
}
//and then proceed with extracting the hostname
hostname = strings.Split(uri, "/")[0]
hostname = strings.Replace(hostname, ".", "_", -1)
hostname = strings.Replace(hostname, ":", "_", -1)
if !(len(hostname) > 0) {
panic(errors.New("Hostname cannot be extracted from Event uri: " + uri))
}
return hostname
} | [
"func",
"(",
"p",
"*",
"HttpStartStopProcessor",
")",
"parseEventUri",
"(",
"uri",
"string",
")",
"string",
"{",
"hostname",
":=",
"\"",
"\"",
"\n\n",
"//we first remove the scheme",
"if",
"strings",
".",
"Contains",
"(",
"uri",
",",
"\"",
"\"",
")",
"{",
... | //we want to be able to parse events whether they contain the scheme
//element in their uri field or not | [
"we",
"want",
"to",
"be",
"able",
"to",
"parse",
"events",
"whether",
"they",
"contain",
"the",
"scheme",
"element",
"in",
"their",
"uri",
"field",
"or",
"not"
] | 170aafd797d9fbfaa707295b39465d1b744a5050 | https://github.com/pivotal-cf/graphite-nozzle/blob/170aafd797d9fbfaa707295b39465d1b744a5050/processors/http_start_stop_processor.go#L47-L66 |
152,889 | lestrrat/go-slack | reminders_gen.go | Add | func (s *RemindersService) Add(text string, time int) *RemindersAddCall {
var call RemindersAddCall
call.service = s
call.text = text
call.time = time
return &call
} | go | func (s *RemindersService) Add(text string, time int) *RemindersAddCall {
var call RemindersAddCall
call.service = s
call.text = text
call.time = time
return &call
} | [
"func",
"(",
"s",
"*",
"RemindersService",
")",
"Add",
"(",
"text",
"string",
",",
"time",
"int",
")",
"*",
"RemindersAddCall",
"{",
"var",
"call",
"RemindersAddCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"text",
"=",
"text",
"\n"... | // Add creates a RemindersAddCall object in preparation for accessing the reminders.add endpoint | [
"Add",
"creates",
"a",
"RemindersAddCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"reminders",
".",
"add",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/reminders_gen.go#L51-L57 |
152,890 | lestrrat/go-slack | reminders_gen.go | ValidateArgs | func (c *RemindersAddCall) ValidateArgs() error {
if len(c.text) <= 0 {
return errors.New(`required field text not initialized`)
}
if c.time == 0 {
return errors.New(`required field time not initialized`)
}
return nil
} | go | func (c *RemindersAddCall) ValidateArgs() error {
if len(c.text) <= 0 {
return errors.New(`required field text not initialized`)
}
if c.time == 0 {
return errors.New(`required field time not initialized`)
}
return nil
} | [
"func",
"(",
"c",
"*",
"RemindersAddCall",
")",
"ValidateArgs",
"(",
")",
"error",
"{",
"if",
"len",
"(",
"c",
".",
"text",
")",
"<=",
"0",
"{",
"return",
"errors",
".",
"New",
"(",
"`required field text not initialized`",
")",
"\n",
"}",
"\n",
"if",
"... | // ValidateArgs checks that all required fields are set in the RemindersAddCall object | [
"ValidateArgs",
"checks",
"that",
"all",
"required",
"fields",
"are",
"set",
"in",
"the",
"RemindersAddCall",
"object"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/reminders_gen.go#L66-L74 |
152,891 | lestrrat/go-slack | reminders_gen.go | Values | func (c *RemindersAddCall) Values() (url.Values, error) {
if err := c.ValidateArgs(); err != nil {
return nil, errors.Wrap(err, `failed validation`)
}
v := url.Values{}
v.Set(`token`, c.service.token)
v.Set("text", c.text)
v.Set("time", strconv.Itoa(c.time))
if len(c.user) > 0 {
v.Set("user", c.user)
}
return v, nil
} | go | func (c *RemindersAddCall) Values() (url.Values, error) {
if err := c.ValidateArgs(); err != nil {
return nil, errors.Wrap(err, `failed validation`)
}
v := url.Values{}
v.Set(`token`, c.service.token)
v.Set("text", c.text)
v.Set("time", strconv.Itoa(c.time))
if len(c.user) > 0 {
v.Set("user", c.user)
}
return v, nil
} | [
"func",
"(",
"c",
"*",
"RemindersAddCall",
")",
"Values",
"(",
")",
"(",
"url",
".",
"Values",
",",
"error",
")",
"{",
"if",
"err",
":=",
"c",
".",
"ValidateArgs",
"(",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"errors",
".",
"Wrap... | // Values returns the RemindersAddCall object as url.Values | [
"Values",
"returns",
"the",
"RemindersAddCall",
"object",
"as",
"url",
".",
"Values"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/reminders_gen.go#L77-L92 |
152,892 | lestrrat/go-slack | reminders_gen.go | Delete | func (s *RemindersService) Delete(reminder string) *RemindersDeleteCall {
var call RemindersDeleteCall
call.service = s
call.reminder = reminder
return &call
} | go | func (s *RemindersService) Delete(reminder string) *RemindersDeleteCall {
var call RemindersDeleteCall
call.service = s
call.reminder = reminder
return &call
} | [
"func",
"(",
"s",
"*",
"RemindersService",
")",
"Delete",
"(",
"reminder",
"string",
")",
"*",
"RemindersDeleteCall",
"{",
"var",
"call",
"RemindersDeleteCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"reminder",
"=",
"reminder",
"\n",
"... | // Delete creates a RemindersDeleteCall object in preparation for accessing the reminders.delete endpoint | [
"Delete",
"creates",
"a",
"RemindersDeleteCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"reminders",
".",
"delete",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/reminders_gen.go#L194-L199 |
152,893 | lestrrat/go-slack | reminders_gen.go | Info | func (s *RemindersService) Info(reminder string) *RemindersInfoCall {
var call RemindersInfoCall
call.service = s
call.reminder = reminder
return &call
} | go | func (s *RemindersService) Info(reminder string) *RemindersInfoCall {
var call RemindersInfoCall
call.service = s
call.reminder = reminder
return &call
} | [
"func",
"(",
"s",
"*",
"RemindersService",
")",
"Info",
"(",
"reminder",
"string",
")",
"*",
"RemindersInfoCall",
"{",
"var",
"call",
"RemindersInfoCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"call",
".",
"reminder",
"=",
"reminder",
"\n",
"return... | // Info creates a RemindersInfoCall object in preparation for accessing the reminders.info endpoint | [
"Info",
"creates",
"a",
"RemindersInfoCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"reminders",
".",
"info",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/reminders_gen.go#L252-L257 |
152,894 | lestrrat/go-slack | reminders_gen.go | ValidateArgs | func (c *RemindersInfoCall) ValidateArgs() error {
if len(c.reminder) <= 0 {
return errors.New(`required field reminder not initialized`)
}
return nil
} | go | func (c *RemindersInfoCall) ValidateArgs() error {
if len(c.reminder) <= 0 {
return errors.New(`required field reminder not initialized`)
}
return nil
} | [
"func",
"(",
"c",
"*",
"RemindersInfoCall",
")",
"ValidateArgs",
"(",
")",
"error",
"{",
"if",
"len",
"(",
"c",
".",
"reminder",
")",
"<=",
"0",
"{",
"return",
"errors",
".",
"New",
"(",
"`required field reminder not initialized`",
")",
"\n",
"}",
"\n",
... | // ValidateArgs checks that all required fields are set in the RemindersInfoCall object | [
"ValidateArgs",
"checks",
"that",
"all",
"required",
"fields",
"are",
"set",
"in",
"the",
"RemindersInfoCall",
"object"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/reminders_gen.go#L260-L265 |
152,895 | lestrrat/go-slack | reminders_gen.go | List | func (s *RemindersService) List() *RemindersListCall {
var call RemindersListCall
call.service = s
return &call
} | go | func (s *RemindersService) List() *RemindersListCall {
var call RemindersListCall
call.service = s
return &call
} | [
"func",
"(",
"s",
"*",
"RemindersService",
")",
"List",
"(",
")",
"*",
"RemindersListCall",
"{",
"var",
"call",
"RemindersListCall",
"\n",
"call",
".",
"service",
"=",
"s",
"\n",
"return",
"&",
"call",
"\n",
"}"
] | // List creates a RemindersListCall object in preparation for accessing the reminders.list endpoint | [
"List",
"creates",
"a",
"RemindersListCall",
"object",
"in",
"preparation",
"for",
"accessing",
"the",
"reminders",
".",
"list",
"endpoint"
] | 0a277f80881a4cd1e12ca3228786c50f6922c0a8 | https://github.com/lestrrat/go-slack/blob/0a277f80881a4cd1e12ca3228786c50f6922c0a8/reminders_gen.go#L311-L315 |
152,896 | k-sone/critbitgo | critbit.go | criticalBit | func (n *external) criticalBit(key []byte) (offset int, bit byte, cont bool) {
nlen := len(n.key)
klen := len(key)
mlen := nlen
if nlen > klen {
mlen = klen
}
// find first differing byte and bit
for offset = 0; offset < mlen; offset++ {
if a, b := key[offset], n.key[offset]; a != b {
bit = msbMatrix[a^b]
return
}
}
if nlen < klen {
bit = msbMatrix[key[offset]]
} else if nlen > klen {
bit = msbMatrix[n.key[offset]]
} else {
// two keys are equal
offset = -1
}
return offset, bit, true
} | go | func (n *external) criticalBit(key []byte) (offset int, bit byte, cont bool) {
nlen := len(n.key)
klen := len(key)
mlen := nlen
if nlen > klen {
mlen = klen
}
// find first differing byte and bit
for offset = 0; offset < mlen; offset++ {
if a, b := key[offset], n.key[offset]; a != b {
bit = msbMatrix[a^b]
return
}
}
if nlen < klen {
bit = msbMatrix[key[offset]]
} else if nlen > klen {
bit = msbMatrix[n.key[offset]]
} else {
// two keys are equal
offset = -1
}
return offset, bit, true
} | [
"func",
"(",
"n",
"*",
"external",
")",
"criticalBit",
"(",
"key",
"[",
"]",
"byte",
")",
"(",
"offset",
"int",
",",
"bit",
"byte",
",",
"cont",
"bool",
")",
"{",
"nlen",
":=",
"len",
"(",
"n",
".",
"key",
")",
"\n",
"klen",
":=",
"len",
"(",
... | // finding the critical bit. | [
"finding",
"the",
"critical",
"bit",
"."
] | 658116ef1e826b72c603cfe2091b12503f9bca43 | https://github.com/k-sone/critbitgo/blob/658116ef1e826b72c603cfe2091b12503f9bca43/critbit.go#L43-L68 |
152,897 | k-sone/critbitgo | critbit.go | direction | func (n *internal) direction(key []byte) int {
if n.offset < len(key) && (key[n.offset]&n.bit != 0 || n.cont) {
return 1
}
return 0
} | go | func (n *internal) direction(key []byte) int {
if n.offset < len(key) && (key[n.offset]&n.bit != 0 || n.cont) {
return 1
}
return 0
} | [
"func",
"(",
"n",
"*",
"internal",
")",
"direction",
"(",
"key",
"[",
"]",
"byte",
")",
"int",
"{",
"if",
"n",
".",
"offset",
"<",
"len",
"(",
"key",
")",
"&&",
"(",
"key",
"[",
"n",
".",
"offset",
"]",
"&",
"n",
".",
"bit",
"!=",
"0",
"||"... | // calculate direction. | [
"calculate",
"direction",
"."
] | 658116ef1e826b72c603cfe2091b12503f9bca43 | https://github.com/k-sone/critbitgo/blob/658116ef1e826b72c603cfe2091b12503f9bca43/critbit.go#L71-L76 |
152,898 | k-sone/critbitgo | critbit.go | search | func (t *Trie) search(key []byte) *node {
n := &t.root
for n.internal != nil {
n = &n.internal.child[n.internal.direction(key)]
}
return n
} | go | func (t *Trie) search(key []byte) *node {
n := &t.root
for n.internal != nil {
n = &n.internal.child[n.internal.direction(key)]
}
return n
} | [
"func",
"(",
"t",
"*",
"Trie",
")",
"search",
"(",
"key",
"[",
"]",
"byte",
")",
"*",
"node",
"{",
"n",
":=",
"&",
"t",
".",
"root",
"\n",
"for",
"n",
".",
"internal",
"!=",
"nil",
"{",
"n",
"=",
"&",
"n",
".",
"internal",
".",
"child",
"["... | // searching the tree. | [
"searching",
"the",
"tree",
"."
] | 658116ef1e826b72c603cfe2091b12503f9bca43 | https://github.com/k-sone/critbitgo/blob/658116ef1e826b72c603cfe2091b12503f9bca43/critbit.go#L85-L91 |
152,899 | k-sone/critbitgo | critbit.go | Contains | func (t *Trie) Contains(key []byte) bool {
if n := t.search(key); n.external != nil && bytes.Equal(n.external.key, key) {
return true
}
return false
} | go | func (t *Trie) Contains(key []byte) bool {
if n := t.search(key); n.external != nil && bytes.Equal(n.external.key, key) {
return true
}
return false
} | [
"func",
"(",
"t",
"*",
"Trie",
")",
"Contains",
"(",
"key",
"[",
"]",
"byte",
")",
"bool",
"{",
"if",
"n",
":=",
"t",
".",
"search",
"(",
"key",
")",
";",
"n",
".",
"external",
"!=",
"nil",
"&&",
"bytes",
".",
"Equal",
"(",
"n",
".",
"externa... | // membership testing. | [
"membership",
"testing",
"."
] | 658116ef1e826b72c603cfe2091b12503f9bca43 | https://github.com/k-sone/critbitgo/blob/658116ef1e826b72c603cfe2091b12503f9bca43/critbit.go#L94-L99 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.