repo
stringlengths
5
67
path
stringlengths
4
218
func_name
stringlengths
0
151
original_string
stringlengths
52
373k
language
stringclasses
6 values
code
stringlengths
52
373k
code_tokens
listlengths
10
512
docstring
stringlengths
3
47.2k
docstring_tokens
listlengths
3
234
sha
stringlengths
40
40
url
stringlengths
85
339
partition
stringclasses
3 values
algolia/algoliasearch-client-go
algolia/insights/client.go
User
func (c *Client) User(userToken string) *UserClient { return &UserClient{ UserToken: userToken, Client: *c, } }
go
func (c *Client) User(userToken string) *UserClient { return &UserClient{ UserToken: userToken, Client: *c, } }
[ "func", "(", "c", "*", "Client", ")", "User", "(", "userToken", "string", ")", "*", "UserClient", "{", "return", "&", "UserClient", "{", "UserToken", ":", "userToken", ",", "Client", ":", "*", "c", ",", "}", "\n", "}" ]
// User instantiates a new client able to interact with the Algolia Insights API // where all events will be sent with the userToken field preset according to // the given userToken.
[ "User", "instantiates", "a", "new", "client", "able", "to", "interact", "with", "the", "Algolia", "Insights", "API", "where", "all", "events", "will", "be", "sent", "with", "the", "userToken", "field", "preset", "according", "to", "the", "given", "userToken", ...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/insights/client.go#L58-L63
train
algolia/algoliasearch-client-go
algolia/insights/client.go
SendEvent
func (c *Client) SendEvent(event Event, opts ...interface{}) (res StatusMessageRes, err error) { return c.SendEvents([]Event{event}, opts...) }
go
func (c *Client) SendEvent(event Event, opts ...interface{}) (res StatusMessageRes, err error) { return c.SendEvents([]Event{event}, opts...) }
[ "func", "(", "c", "*", "Client", ")", "SendEvent", "(", "event", "Event", ",", "opts", "...", "interface", "{", "}", ")", "(", "res", "StatusMessageRes", ",", "err", "error", ")", "{", "return", "c", ".", "SendEvents", "(", "[", "]", "Event", "{", ...
// SendEvent sends a new raw event to the Algolia Insights API. This method // should only be used to send a custom event to the API. To send more common // and predefined events, please use methods from UserClient instead.
[ "SendEvent", "sends", "a", "new", "raw", "event", "to", "the", "Algolia", "Insights", "API", ".", "This", "method", "should", "only", "be", "used", "to", "send", "a", "custom", "event", "to", "the", "API", ".", "To", "send", "more", "common", "and", "p...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/insights/client.go#L68-L70
train
algolia/algoliasearch-client-go
algolia/insights/client.go
SendEvents
func (c *Client) SendEvents(events []Event, opts ...interface{}) (res StatusMessageRes, err error) { body := newSendEventsReq(events) err = c.transport.Request(&res, http.MethodPost, "/1/events", body, call.Write, opts...) return }
go
func (c *Client) SendEvents(events []Event, opts ...interface{}) (res StatusMessageRes, err error) { body := newSendEventsReq(events) err = c.transport.Request(&res, http.MethodPost, "/1/events", body, call.Write, opts...) return }
[ "func", "(", "c", "*", "Client", ")", "SendEvents", "(", "events", "[", "]", "Event", ",", "opts", "...", "interface", "{", "}", ")", "(", "res", "StatusMessageRes", ",", "err", "error", ")", "{", "body", ":=", "newSendEventsReq", "(", "events", ")", ...
// SendEvents sends new raw events to the Algolia Insights API. This method // should only be used to send custom events to the API. To send more common and // predefined events, please use methods from UserClient instead.
[ "SendEvents", "sends", "new", "raw", "events", "to", "the", "Algolia", "Insights", "API", ".", "This", "method", "should", "only", "be", "used", "to", "send", "custom", "events", "to", "the", "API", ".", "To", "send", "more", "common", "and", "predefined",...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/insights/client.go#L75-L79
train
algolia/algoliasearch-client-go
algolia/opt/synonyms.go
SynonymsEqual
func SynonymsEqual(o1, o2 *SynonymsOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func SynonymsEqual(o1, o2 *SynonymsOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "SynonymsEqual", "(", "o1", ",", "o2", "*", "SynonymsOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "Equal", "(", ...
// SynonymsEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "SynonymsEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", "defau...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/synonyms.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/opt/allow_typos_on_numeric_tokens.go
AllowTyposOnNumericTokensEqual
func AllowTyposOnNumericTokensEqual(o1, o2 *AllowTyposOnNumericTokensOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func AllowTyposOnNumericTokensEqual(o1, o2 *AllowTyposOnNumericTokensOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "AllowTyposOnNumericTokensEqual", "(", "o1", ",", "o2", "*", "AllowTyposOnNumericTokensOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return",...
// AllowTyposOnNumericTokensEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "AllowTyposOnNumericTokensEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", ...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/allow_typos_on_numeric_tokens.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/internal/opt/enable_rules.go
ExtractEnableRules
func ExtractEnableRules(opts ...interface{}) *opt.EnableRulesOption { for _, o := range opts { if v, ok := o.(*opt.EnableRulesOption); ok { return v } } return nil }
go
func ExtractEnableRules(opts ...interface{}) *opt.EnableRulesOption { for _, o := range opts { if v, ok := o.(*opt.EnableRulesOption); ok { return v } } return nil }
[ "func", "ExtractEnableRules", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "EnableRulesOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "EnableRulesOption"...
// ExtractEnableRules returns the first found EnableRulesOption from the // given variadic arguments or nil otherwise.
[ "ExtractEnableRules", "returns", "the", "first", "found", "EnableRulesOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/enable_rules.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/internal/opt/percentile_computation.go
ExtractPercentileComputation
func ExtractPercentileComputation(opts ...interface{}) *opt.PercentileComputationOption { for _, o := range opts { if v, ok := o.(*opt.PercentileComputationOption); ok { return v } } return nil }
go
func ExtractPercentileComputation(opts ...interface{}) *opt.PercentileComputationOption { for _, o := range opts { if v, ok := o.(*opt.PercentileComputationOption); ok { return v } } return nil }
[ "func", "ExtractPercentileComputation", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "PercentileComputationOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", ...
// ExtractPercentileComputation returns the first found PercentileComputationOption from the // given variadic arguments or nil otherwise.
[ "ExtractPercentileComputation", "returns", "the", "first", "found", "PercentileComputationOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/percentile_computation.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/page.go
PageEqual
func PageEqual(o1, o2 *PageOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func PageEqual(o1, o2 *PageOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "PageEqual", "(", "o1", ",", "o2", "*", "PageOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "Equal", "(", "o1", ...
// PageEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "PageEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", "default",...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/page.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/analytics/client.go
NewClientWithConfig
func NewClientWithConfig(config Configuration) *Client { var hosts []*transport.StatefulHost if config.Hosts == nil { hosts = defaultHosts(config.Region) } else { for _, h := range config.Hosts { hosts = append(hosts, transport.NewStatefulHost(h, call.IsReadWrite)) } } searchConfig := search.Configuration{ AppID: config.AppID, APIKey: config.APIKey, Requester: config.Requester, ReadTimeout: config.ReadTimeout, WriteTimeout: config.WriteTimeout, Headers: config.Headers, ExtraUserAgent: config.ExtraUserAgent, } return &Client{ appID: config.AppID, searchClient: search.NewClientWithConfig(searchConfig), transport: transport.New( hosts, config.Requester, config.AppID, config.APIKey, config.ReadTimeout, config.WriteTimeout, config.Headers, config.ExtraUserAgent, ), } }
go
func NewClientWithConfig(config Configuration) *Client { var hosts []*transport.StatefulHost if config.Hosts == nil { hosts = defaultHosts(config.Region) } else { for _, h := range config.Hosts { hosts = append(hosts, transport.NewStatefulHost(h, call.IsReadWrite)) } } searchConfig := search.Configuration{ AppID: config.AppID, APIKey: config.APIKey, Requester: config.Requester, ReadTimeout: config.ReadTimeout, WriteTimeout: config.WriteTimeout, Headers: config.Headers, ExtraUserAgent: config.ExtraUserAgent, } return &Client{ appID: config.AppID, searchClient: search.NewClientWithConfig(searchConfig), transport: transport.New( hosts, config.Requester, config.AppID, config.APIKey, config.ReadTimeout, config.WriteTimeout, config.Headers, config.ExtraUserAgent, ), } }
[ "func", "NewClientWithConfig", "(", "config", "Configuration", ")", "*", "Client", "{", "var", "hosts", "[", "]", "*", "transport", ".", "StatefulHost", "\n", "if", "config", ".", "Hosts", "==", "nil", "{", "hosts", "=", "defaultHosts", "(", "config", ".",...
// NewClientWithConfig instantiates a new client able to interact with the // Algolia Analytics API.
[ "NewClientWithConfig", "instantiates", "a", "new", "client", "able", "to", "interact", "with", "the", "Algolia", "Analytics", "API", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/analytics/client.go#L29-L64
train
algolia/algoliasearch-client-go
algolia/internal/opt/attributes_to_retrieve.go
ExtractAttributesToRetrieve
func ExtractAttributesToRetrieve(opts ...interface{}) *opt.AttributesToRetrieveOption { for _, o := range opts { if v, ok := o.(*opt.AttributesToRetrieveOption); ok { return v } } return nil }
go
func ExtractAttributesToRetrieve(opts ...interface{}) *opt.AttributesToRetrieveOption { for _, o := range opts { if v, ok := o.(*opt.AttributesToRetrieveOption); ok { return v } } return nil }
[ "func", "ExtractAttributesToRetrieve", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "AttributesToRetrieveOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "...
// ExtractAttributesToRetrieve returns the first found AttributesToRetrieveOption from the // given variadic arguments or nil otherwise.
[ "ExtractAttributesToRetrieve", "returns", "the", "first", "found", "AttributesToRetrieveOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/attributes_to_retrieve.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/remove_stop_words.go
MarshalJSON
func (o RemoveStopWordsOption) MarshalJSON() ([]byte, error) { if len(o.languages) > 0 { return json.Marshal(o.languages) } return json.Marshal(o.removeStopWords) }
go
func (o RemoveStopWordsOption) MarshalJSON() ([]byte, error) { if len(o.languages) > 0 { return json.Marshal(o.languages) } return json.Marshal(o.removeStopWords) }
[ "func", "(", "o", "RemoveStopWordsOption", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "if", "len", "(", "o", ".", "languages", ")", ">", "0", "{", "return", "json", ".", "Marshal", "(", "o", ".", "languages", ")", ...
// MarshalJSON implements the json.Marshaler interface for // RemoveStopWordsOption.
[ "MarshalJSON", "implements", "the", "json", ".", "Marshaler", "interface", "for", "RemoveStopWordsOption", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/remove_stop_words.go#L36-L41
train
algolia/algoliasearch-client-go
algolia/opt/remove_stop_words.go
UnmarshalJSON
func (o *RemoveStopWordsOption) UnmarshalJSON(data []byte) error { if string(data) == "null" { return nil } if err := json.Unmarshal(data, &o.languages); err == nil { return nil } return json.Unmarshal(data, &o.removeStopWords) }
go
func (o *RemoveStopWordsOption) UnmarshalJSON(data []byte) error { if string(data) == "null" { return nil } if err := json.Unmarshal(data, &o.languages); err == nil { return nil } return json.Unmarshal(data, &o.removeStopWords) }
[ "func", "(", "o", "*", "RemoveStopWordsOption", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "if", "string", "(", "data", ")", "==", "\"null\"", "{", "return", "nil", "\n", "}", "\n", "if", "err", ":=", "json", ".", "Unmars...
// UnmarshalJSON implements the json.Unmarshaler interface for // RemoveStopWordsOption.
[ "UnmarshalJSON", "implements", "the", "json", ".", "Unmarshaler", "interface", "for", "RemoveStopWordsOption", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/remove_stop_words.go#L45-L55
train
algolia/algoliasearch-client-go
algolia/opt/remove_stop_words.go
RemoveStopWordsEqual
func RemoveStopWordsEqual(o1, o2 *RemoveStopWordsOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func RemoveStopWordsEqual(o1, o2 *RemoveStopWordsOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "RemoveStopWordsEqual", "(", "o1", ",", "o2", "*", "RemoveStopWordsOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "E...
// RemoveStopWordsEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "RemoveStopWordsEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", ...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/remove_stop_words.go#L70-L78
train
algolia/algoliasearch-client-go
algolia/internal/opt/explain.go
ExtractExplain
func ExtractExplain(opts ...interface{}) *opt.ExplainOption { for _, o := range opts { if v, ok := o.(*opt.ExplainOption); ok { return v } } return nil }
go
func ExtractExplain(opts ...interface{}) *opt.ExplainOption { for _, o := range opts { if v, ok := o.(*opt.ExplainOption); ok { return v } } return nil }
[ "func", "ExtractExplain", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "ExplainOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "ExplainOption", ")", "...
// ExtractExplain returns the first found ExplainOption from the // given variadic arguments or nil otherwise.
[ "ExtractExplain", "returns", "the", "first", "found", "ExplainOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/explain.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/internal/opt/restrict_searchable_attributes.go
ExtractRestrictSearchableAttributes
func ExtractRestrictSearchableAttributes(opts ...interface{}) *opt.RestrictSearchableAttributesOption { for _, o := range opts { if v, ok := o.(*opt.RestrictSearchableAttributesOption); ok { return v } } return nil }
go
func ExtractRestrictSearchableAttributes(opts ...interface{}) *opt.RestrictSearchableAttributesOption { for _, o := range opts { if v, ok := o.(*opt.RestrictSearchableAttributesOption); ok { return v } } return nil }
[ "func", "ExtractRestrictSearchableAttributes", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "RestrictSearchableAttributesOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "...
// ExtractRestrictSearchableAttributes returns the first found RestrictSearchableAttributesOption from the // given variadic arguments or nil otherwise.
[ "ExtractRestrictSearchableAttributes", "returns", "the", "first", "found", "RestrictSearchableAttributesOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/restrict_searchable_attributes.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/replace_existing_synonyms.go
ReplaceExistingSynonymsEqual
func ReplaceExistingSynonymsEqual(o1, o2 *ReplaceExistingSynonymsOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func ReplaceExistingSynonymsEqual(o1, o2 *ReplaceExistingSynonymsOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "ReplaceExistingSynonymsEqual", "(", "o1", ",", "o2", "*", "ReplaceExistingSynonymsOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "...
// ReplaceExistingSynonymsEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "ReplaceExistingSynonymsEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", ...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/replace_existing_synonyms.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/internal/opt/scopes.go
ExtractScopes
func ExtractScopes(opts ...interface{}) *opt.ScopesOption { for _, o := range opts { if v, ok := o.(*opt.ScopesOption); ok { return v } } return nil }
go
func ExtractScopes(opts ...interface{}) *opt.ScopesOption { for _, o := range opts { if v, ok := o.(*opt.ScopesOption); ok { return v } } return nil }
[ "func", "ExtractScopes", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "ScopesOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "ScopesOption", ")", ";",...
// ExtractScopes returns the first found ScopesOption from the // given variadic arguments or nil otherwise.
[ "ExtractScopes", "returns", "the", "first", "found", "ScopesOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/scopes.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/search/client_operations.go
CopySynonyms
func (c *Client) CopySynonyms(source, destination string, opts ...interface{}) (UpdateTaskRes, error) { opts = opt.InsertOrReplaceOption(opts, opt.Scopes("synonyms")) return c.CopyIndex(source, destination, opts...) }
go
func (c *Client) CopySynonyms(source, destination string, opts ...interface{}) (UpdateTaskRes, error) { opts = opt.InsertOrReplaceOption(opts, opt.Scopes("synonyms")) return c.CopyIndex(source, destination, opts...) }
[ "func", "(", "c", "*", "Client", ")", "CopySynonyms", "(", "source", ",", "destination", "string", ",", "opts", "...", "interface", "{", "}", ")", "(", "UpdateTaskRes", ",", "error", ")", "{", "opts", "=", "opt", ".", "InsertOrReplaceOption", "(", "opts"...
// CopySynonyms copies the synonyms from the given source index into the destination one. // // This method can only be used with indices which belong to the same Algolia application.
[ "CopySynonyms", "copies", "the", "synonyms", "from", "the", "given", "source", "index", "into", "the", "destination", "one", ".", "This", "method", "can", "only", "be", "used", "with", "indices", "which", "belong", "to", "the", "same", "Algolia", "application"...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/search/client_operations.go#L26-L29
train
algolia/algoliasearch-client-go
algolia/internal/opt/synonyms.go
ExtractSynonyms
func ExtractSynonyms(opts ...interface{}) *opt.SynonymsOption { for _, o := range opts { if v, ok := o.(*opt.SynonymsOption); ok { return v } } return nil }
go
func ExtractSynonyms(opts ...interface{}) *opt.SynonymsOption { for _, o := range opts { if v, ok := o.(*opt.SynonymsOption); ok { return v } } return nil }
[ "func", "ExtractSynonyms", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "SynonymsOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "SynonymsOption", ")", ...
// ExtractSynonyms returns the first found SynonymsOption from the // given variadic arguments or nil otherwise.
[ "ExtractSynonyms", "returns", "the", "first", "found", "SynonymsOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/synonyms.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/safe.go
SafeEqual
func SafeEqual(o1, o2 *SafeOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func SafeEqual(o1, o2 *SafeOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "SafeEqual", "(", "o1", ",", "o2", "*", "SafeOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "Equal", "(", "o1", ...
// SafeEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "SafeEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", "default",...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/safe.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/search/index.go
WaitTask
func (i *Index) WaitTask(taskID int) error { return waitWithRetry(func() (bool, error) { res, err := i.GetStatus(taskID) if err != nil { return true, err } if res.Status == "published" { return true, nil } return false, nil }) }
go
func (i *Index) WaitTask(taskID int) error { return waitWithRetry(func() (bool, error) { res, err := i.GetStatus(taskID) if err != nil { return true, err } if res.Status == "published" { return true, nil } return false, nil }) }
[ "func", "(", "i", "*", "Index", ")", "WaitTask", "(", "taskID", "int", ")", "error", "{", "return", "waitWithRetry", "(", "func", "(", ")", "(", "bool", ",", "error", ")", "{", "res", ",", "err", ":=", "i", ".", "GetStatus", "(", "taskID", ")", "...
// WaitTask blocks until the task identified by the given taskID is completed on // Algolia engine.
[ "WaitTask", "blocks", "until", "the", "task", "identified", "by", "the", "given", "taskID", "is", "completed", "on", "Algolia", "engine", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/search/index.go#L40-L51
train
algolia/algoliasearch-client-go
algolia/search/index.go
ClearObjects
func (i *Index) ClearObjects(opts ...interface{}) (res UpdateTaskRes, err error) { path := i.path("/clear") err = i.transport.Request(&res, http.MethodPost, path, nil, call.Write, opts...) res.wait = i.WaitTask return }
go
func (i *Index) ClearObjects(opts ...interface{}) (res UpdateTaskRes, err error) { path := i.path("/clear") err = i.transport.Request(&res, http.MethodPost, path, nil, call.Write, opts...) res.wait = i.WaitTask return }
[ "func", "(", "i", "*", "Index", ")", "ClearObjects", "(", "opts", "...", "interface", "{", "}", ")", "(", "res", "UpdateTaskRes", ",", "err", "error", ")", "{", "path", ":=", "i", ".", "path", "(", "\"/clear\"", ")", "\n", "err", "=", "i", ".", "...
// ClearObjects deletes all the records of the index.
[ "ClearObjects", "deletes", "all", "the", "records", "of", "the", "index", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/search/index.go#L76-L81
train
algolia/algoliasearch-client-go
algolia/search/index.go
Delete
func (i *Index) Delete(opts ...interface{}) (res DeleteTaskRes, err error) { path := i.path("") err = i.transport.Request(&res, http.MethodDelete, path, nil, call.Write, opts...) res.wait = i.WaitTask return }
go
func (i *Index) Delete(opts ...interface{}) (res DeleteTaskRes, err error) { path := i.path("") err = i.transport.Request(&res, http.MethodDelete, path, nil, call.Write, opts...) res.wait = i.WaitTask return }
[ "func", "(", "i", "*", "Index", ")", "Delete", "(", "opts", "...", "interface", "{", "}", ")", "(", "res", "DeleteTaskRes", ",", "err", "error", ")", "{", "path", ":=", "i", ".", "path", "(", "\"\"", ")", "\n", "err", "=", "i", ".", "transport", ...
// Delete removes the entire index. After this call, new indexing calls can be // sent with the same index instance.
[ "Delete", "removes", "the", "entire", "index", ".", "After", "this", "call", "new", "indexing", "calls", "can", "be", "sent", "with", "the", "same", "index", "instance", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/search/index.go#L85-L90
train
algolia/algoliasearch-client-go
algolia/search/index.go
GetStatus
func (i *Index) GetStatus(taskID int) (res TaskStatusRes, err error) { path := i.path("/task/%d", taskID) err = i.transport.Request(&res, http.MethodGet, path, nil, call.Read) return }
go
func (i *Index) GetStatus(taskID int) (res TaskStatusRes, err error) { path := i.path("/task/%d", taskID) err = i.transport.Request(&res, http.MethodGet, path, nil, call.Read) return }
[ "func", "(", "i", "*", "Index", ")", "GetStatus", "(", "taskID", "int", ")", "(", "res", "TaskStatusRes", ",", "err", "error", ")", "{", "path", ":=", "i", ".", "path", "(", "\"/task/%d\"", ",", "taskID", ")", "\n", "err", "=", "i", ".", "transport...
// GetStatus retrieves the task status according to the Algolia engine for the // given task.
[ "GetStatus", "retrieves", "the", "task", "status", "according", "to", "the", "Algolia", "engine", "for", "the", "given", "task", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/search/index.go#L94-L98
train
algolia/algoliasearch-client-go
algolia/iterator/iterator.go
New
func New(itf interface{}) Iterator { // First, if the given interface already is an iterator.Iterator, // we return it as-is. if it, ok := itf.(Iterator); ok { return it } value := reflect.ValueOf(itf) switch value.Kind() { case reflect.Array, reflect.Slice: // In case the objects are sent as a slice or an array, we iterate over // them to produce a []interface{} which we then wrap on an // iterator.sliceIterator. var slice []interface{} for i := 0; i < value.Len(); i++ { slice = append(slice, value.Index(i).Interface()) } return newIteratorFromSlice(slice) default: // Otherwise, the objects is most probably a single object. In that case, // we consider it as a single object and produce a slice with this object // as the sole element, which we also wrap in an iterator.Iterator. return newIteratorFromSlice([]interface{}{itf}) } }
go
func New(itf interface{}) Iterator { // First, if the given interface already is an iterator.Iterator, // we return it as-is. if it, ok := itf.(Iterator); ok { return it } value := reflect.ValueOf(itf) switch value.Kind() { case reflect.Array, reflect.Slice: // In case the objects are sent as a slice or an array, we iterate over // them to produce a []interface{} which we then wrap on an // iterator.sliceIterator. var slice []interface{} for i := 0; i < value.Len(); i++ { slice = append(slice, value.Index(i).Interface()) } return newIteratorFromSlice(slice) default: // Otherwise, the objects is most probably a single object. In that case, // we consider it as a single object and produce a slice with this object // as the sole element, which we also wrap in an iterator.Iterator. return newIteratorFromSlice([]interface{}{itf}) } }
[ "func", "New", "(", "itf", "interface", "{", "}", ")", "Iterator", "{", "if", "it", ",", "ok", ":=", "itf", ".", "(", "Iterator", ")", ";", "ok", "{", "return", "it", "\n", "}", "\n", "value", ":=", "reflect", ".", "ValueOf", "(", "itf", ")", "...
// New is used to produce an `iterator.Iterator` out of Go arrays or slices or // any object instance implementing the `iterator.Iterator`. For now, Go // channels and maps are not supported.
[ "New", "is", "used", "to", "produce", "an", "iterator", ".", "Iterator", "out", "of", "Go", "arrays", "or", "slices", "or", "any", "object", "instance", "implementing", "the", "iterator", ".", "Iterator", ".", "For", "now", "Go", "channels", "and", "maps",...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/iterator/iterator.go#L18-L42
train
algolia/algoliasearch-client-go
algolia/internal/opt/disable_prefix_on_attributes.go
ExtractDisablePrefixOnAttributes
func ExtractDisablePrefixOnAttributes(opts ...interface{}) *opt.DisablePrefixOnAttributesOption { for _, o := range opts { if v, ok := o.(*opt.DisablePrefixOnAttributesOption); ok { return v } } return nil }
go
func ExtractDisablePrefixOnAttributes(opts ...interface{}) *opt.DisablePrefixOnAttributesOption { for _, o := range opts { if v, ok := o.(*opt.DisablePrefixOnAttributesOption); ok { return v } } return nil }
[ "func", "ExtractDisablePrefixOnAttributes", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "DisablePrefixOnAttributesOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ...
// ExtractDisablePrefixOnAttributes returns the first found DisablePrefixOnAttributesOption from the // given variadic arguments or nil otherwise.
[ "ExtractDisablePrefixOnAttributes", "returns", "the", "first", "found", "DisablePrefixOnAttributesOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/disable_prefix_on_attributes.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/internal/opt/min_word_sizefor1_typo.go
ExtractMinWordSizefor1Typo
func ExtractMinWordSizefor1Typo(opts ...interface{}) *opt.MinWordSizefor1TypoOption { for _, o := range opts { if v, ok := o.(*opt.MinWordSizefor1TypoOption); ok { return v } } return nil }
go
func ExtractMinWordSizefor1Typo(opts ...interface{}) *opt.MinWordSizefor1TypoOption { for _, o := range opts { if v, ok := o.(*opt.MinWordSizefor1TypoOption); ok { return v } } return nil }
[ "func", "ExtractMinWordSizefor1Typo", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "MinWordSizefor1TypoOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "Mi...
// ExtractMinWordSizefor1Typo returns the first found MinWordSizefor1TypoOption from the // given variadic arguments or nil otherwise.
[ "ExtractMinWordSizefor1Typo", "returns", "the", "first", "found", "MinWordSizefor1TypoOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/min_word_sizefor1_typo.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/type.go
TypeEqual
func TypeEqual(o1, o2 *TypeOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func TypeEqual(o1, o2 *TypeOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "TypeEqual", "(", "o1", ",", "o2", "*", "TypeOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "Equal", "(", "o1", ...
// TypeEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "TypeEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", "default",...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/type.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/opt/numeric_attributes_for_filtering.go
NumericAttributesForFilteringEqual
func NumericAttributesForFilteringEqual(o1, o2 *NumericAttributesForFilteringOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func NumericAttributesForFilteringEqual(o1, o2 *NumericAttributesForFilteringOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "NumericAttributesForFilteringEqual", "(", "o1", ",", "o2", "*", "NumericAttributesForFilteringOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "...
// NumericAttributesForFilteringEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "NumericAttributesForFilteringEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "t...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/numeric_attributes_for_filtering.go#L58-L66
train
algolia/algoliasearch-client-go
algolia/opt/decompounded_attributes.go
DecompoundedAttributesEqual
func DecompoundedAttributesEqual(o1, o2 *DecompoundedAttributesOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func DecompoundedAttributesEqual(o1, o2 *DecompoundedAttributesOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "DecompoundedAttributesEqual", "(", "o1", ",", "o2", "*", "DecompoundedAttributesOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2...
// DecompoundedAttributesEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "DecompoundedAttributesEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/decompounded_attributes.go#L58-L66
train
algolia/algoliasearch-client-go
algolia/opt/replace_synonyms_in_highlight.go
ReplaceSynonymsInHighlightEqual
func ReplaceSynonymsInHighlightEqual(o1, o2 *ReplaceSynonymsInHighlightOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func ReplaceSynonymsInHighlightEqual(o1, o2 *ReplaceSynonymsInHighlightOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "ReplaceSynonymsInHighlightEqual", "(", "o1", ",", "o2", "*", "ReplaceSynonymsInHighlightOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return...
// ReplaceSynonymsInHighlightEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "ReplaceSynonymsInHighlightEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to",...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/replace_synonyms_in_highlight.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/internal/opt/optional_filters.go
ExtractOptionalFilters
func ExtractOptionalFilters(opts ...interface{}) *opt.OptionalFiltersOption { for _, o := range opts { if v, ok := o.(*opt.OptionalFiltersOption); ok { return v } } return nil }
go
func ExtractOptionalFilters(opts ...interface{}) *opt.OptionalFiltersOption { for _, o := range opts { if v, ok := o.(*opt.OptionalFiltersOption); ok { return v } } return nil }
[ "func", "ExtractOptionalFilters", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "OptionalFiltersOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "OptionalFi...
// ExtractOptionalFilters returns the first found OptionalFiltersOption from the // given variadic arguments or nil otherwise.
[ "ExtractOptionalFilters", "returns", "the", "first", "found", "OptionalFiltersOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/optional_filters.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/internal/opt/primary.go
ExtractPrimary
func ExtractPrimary(opts ...interface{}) *opt.PrimaryOption { for _, o := range opts { if v, ok := o.(*opt.PrimaryOption); ok { return v } } return nil }
go
func ExtractPrimary(opts ...interface{}) *opt.PrimaryOption { for _, o := range opts { if v, ok := o.(*opt.PrimaryOption); ok { return v } } return nil }
[ "func", "ExtractPrimary", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "PrimaryOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "PrimaryOption", ")", "...
// ExtractPrimary returns the first found PrimaryOption from the // given variadic arguments or nil otherwise.
[ "ExtractPrimary", "returns", "the", "first", "found", "PrimaryOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/primary.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/internal/opt/valid_until.go
ExtractValidUntil
func ExtractValidUntil(opts ...interface{}) *opt.ValidUntilOption { for _, o := range opts { if v, ok := o.(*opt.ValidUntilOption); ok { return v } } return nil }
go
func ExtractValidUntil(opts ...interface{}) *opt.ValidUntilOption { for _, o := range opts { if v, ok := o.(*opt.ValidUntilOption); ok { return v } } return nil }
[ "func", "ExtractValidUntil", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "ValidUntilOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "ValidUntilOption", ...
// ExtractValidUntil returns the first found ValidUntilOption from the // given variadic arguments or nil otherwise.
[ "ExtractValidUntil", "returns", "the", "first", "found", "ValidUntilOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/valid_until.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/internal/opt/minimum_around_radius.go
ExtractMinimumAroundRadius
func ExtractMinimumAroundRadius(opts ...interface{}) *opt.MinimumAroundRadiusOption { for _, o := range opts { if v, ok := o.(*opt.MinimumAroundRadiusOption); ok { return v } } return nil }
go
func ExtractMinimumAroundRadius(opts ...interface{}) *opt.MinimumAroundRadiusOption { for _, o := range opts { if v, ok := o.(*opt.MinimumAroundRadiusOption); ok { return v } } return nil }
[ "func", "ExtractMinimumAroundRadius", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "MinimumAroundRadiusOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "Mi...
// ExtractMinimumAroundRadius returns the first found MinimumAroundRadiusOption from the // given variadic arguments or nil otherwise.
[ "ExtractMinimumAroundRadius", "returns", "the", "first", "found", "MinimumAroundRadiusOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/minimum_around_radius.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/internal/opt/extra_url_params.go
ExtractExtraURLParams
func ExtractExtraURLParams(opts ...interface{}) *opt.ExtraURLParamsOption { merged := make(map[string]string) for _, o := range opts { if v, ok := o.(*opt.ExtraURLParamsOption); ok { for key, value := range v.Get() { merged[key] = value } } } if len(merged) == 0 { return nil } return opt.ExtraURLParams(merged) }
go
func ExtractExtraURLParams(opts ...interface{}) *opt.ExtraURLParamsOption { merged := make(map[string]string) for _, o := range opts { if v, ok := o.(*opt.ExtraURLParamsOption); ok { for key, value := range v.Get() { merged[key] = value } } } if len(merged) == 0 { return nil } return opt.ExtraURLParams(merged) }
[ "func", "ExtractExtraURLParams", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "ExtraURLParamsOption", "{", "merged", ":=", "make", "(", "map", "[", "string", "]", "string", ")", "\n", "for", "_", ",", "o", ":=", "range", "opts", "{"...
// ExtractExtraURLParams returns the first found ExtraURLParamsOption from the // given variadic arguments or nil otherwise. If multiple options are found, the // inner maps are merged.
[ "ExtractExtraURLParams", "returns", "the", "first", "found", "ExtraURLParamsOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", ".", "If", "multiple", "options", "are", "found", "the", "inner", "maps", "are", "merged", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/extra_url_params.go#L12-L28
train
algolia/algoliasearch-client-go
algolia/internal/opt/clear_existing_rules.go
ExtractClearExistingRules
func ExtractClearExistingRules(opts ...interface{}) *opt.ClearExistingRulesOption { for _, o := range opts { if v, ok := o.(*opt.ClearExistingRulesOption); ok { return v } } return nil }
go
func ExtractClearExistingRules(opts ...interface{}) *opt.ClearExistingRulesOption { for _, o := range opts { if v, ok := o.(*opt.ClearExistingRulesOption); ok { return v } } return nil }
[ "func", "ExtractClearExistingRules", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "ClearExistingRulesOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "Clea...
// ExtractClearExistingRules returns the first found ClearExistingRulesOption from the // given variadic arguments or nil otherwise.
[ "ExtractClearExistingRules", "returns", "the", "first", "found", "ClearExistingRulesOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/clear_existing_rules.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/around_radius.go
MarshalJSON
func (o AroundRadiusOption) MarshalJSON() ([]byte, error) { if o.isAll { return []byte(`"all"`), nil } if o.meters != 0 { return []byte(fmt.Sprintf("%d", o.meters)), nil } return []byte("null"), nil }
go
func (o AroundRadiusOption) MarshalJSON() ([]byte, error) { if o.isAll { return []byte(`"all"`), nil } if o.meters != 0 { return []byte(fmt.Sprintf("%d", o.meters)), nil } return []byte("null"), nil }
[ "func", "(", "o", "AroundRadiusOption", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "if", "o", ".", "isAll", "{", "return", "[", "]", "byte", "(", "`\"all\"`", ")", ",", "nil", "\n", "}", "\n", "if", "o", ".", "...
// MarshalJSON implements the json.Marshaler interface for // AroundRadiusOption.
[ "MarshalJSON", "implements", "the", "json", ".", "Marshaler", "interface", "for", "AroundRadiusOption", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/around_radius.go#L38-L48
train
algolia/algoliasearch-client-go
algolia/opt/around_radius.go
UnmarshalJSON
func (o *AroundRadiusOption) UnmarshalJSON(data []byte) error { if string(data) == "null" { return nil } var meters int if err := json.Unmarshal(data, &meters); err == nil { o.meters = meters return nil } var all string if err := json.Unmarshal(data, &all); err == nil && all == "all" { o.isAll = true return nil } return errs.ErrJSONDecode(data, "AroundRadiusOption") }
go
func (o *AroundRadiusOption) UnmarshalJSON(data []byte) error { if string(data) == "null" { return nil } var meters int if err := json.Unmarshal(data, &meters); err == nil { o.meters = meters return nil } var all string if err := json.Unmarshal(data, &all); err == nil && all == "all" { o.isAll = true return nil } return errs.ErrJSONDecode(data, "AroundRadiusOption") }
[ "func", "(", "o", "*", "AroundRadiusOption", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "if", "string", "(", "data", ")", "==", "\"null\"", "{", "return", "nil", "\n", "}", "\n", "var", "meters", "int", "\n", "if", "err",...
// UnmarshalJSON implements the json.Unmarshaler interface for // AroundRadiusOption.
[ "UnmarshalJSON", "implements", "the", "json", ".", "Unmarshaler", "interface", "for", "AroundRadiusOption", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/around_radius.go#L52-L70
train
algolia/algoliasearch-client-go
algolia/opt/around_radius.go
AroundRadiusEqual
func AroundRadiusEqual(o1, o2 *AroundRadiusOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func AroundRadiusEqual(o1, o2 *AroundRadiusOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "AroundRadiusEqual", "(", "o1", ",", "o2", "*", "AroundRadiusOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "Equal",...
// AroundRadiusEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "AroundRadiusEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", "d...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/around_radius.go#L85-L93
train
algolia/algoliasearch-client-go
algolia/internal/opt/sum_or_filters_scores.go
ExtractSumOrFiltersScores
func ExtractSumOrFiltersScores(opts ...interface{}) *opt.SumOrFiltersScoresOption { for _, o := range opts { if v, ok := o.(*opt.SumOrFiltersScoresOption); ok { return v } } return nil }
go
func ExtractSumOrFiltersScores(opts ...interface{}) *opt.SumOrFiltersScoresOption { for _, o := range opts { if v, ok := o.(*opt.SumOrFiltersScoresOption); ok { return v } } return nil }
[ "func", "ExtractSumOrFiltersScores", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "SumOrFiltersScoresOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "SumO...
// ExtractSumOrFiltersScores returns the first found SumOrFiltersScoresOption from the // given variadic arguments or nil otherwise.
[ "ExtractSumOrFiltersScores", "returns", "the", "first", "found", "SumOrFiltersScoresOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/sum_or_filters_scores.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/internal/opt/replace_existing_synonyms.go
ExtractReplaceExistingSynonyms
func ExtractReplaceExistingSynonyms(opts ...interface{}) *opt.ReplaceExistingSynonymsOption { for _, o := range opts { if v, ok := o.(*opt.ReplaceExistingSynonymsOption); ok { return v } } return nil }
go
func ExtractReplaceExistingSynonyms(opts ...interface{}) *opt.ReplaceExistingSynonymsOption { for _, o := range opts { if v, ok := o.(*opt.ReplaceExistingSynonymsOption); ok { return v } } return nil }
[ "func", "ExtractReplaceExistingSynonyms", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "ReplaceExistingSynonymsOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", "....
// ExtractReplaceExistingSynonyms returns the first found ReplaceExistingSynonymsOption from the // given variadic arguments or nil otherwise.
[ "ExtractReplaceExistingSynonyms", "returns", "the", "first", "found", "ReplaceExistingSynonymsOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/replace_existing_synonyms.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/internal/opt/decompounded_attributes.go
ExtractDecompoundedAttributes
func ExtractDecompoundedAttributes(opts ...interface{}) *opt.DecompoundedAttributesOption { for _, o := range opts { if v, ok := o.(*opt.DecompoundedAttributesOption); ok { return v } } return nil }
go
func ExtractDecompoundedAttributes(opts ...interface{}) *opt.DecompoundedAttributesOption { for _, o := range opts { if v, ok := o.(*opt.DecompoundedAttributesOption); ok { return v } } return nil }
[ "func", "ExtractDecompoundedAttributes", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "DecompoundedAttributesOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".",...
// ExtractDecompoundedAttributes returns the first found DecompoundedAttributesOption from the // given variadic arguments or nil otherwise.
[ "ExtractDecompoundedAttributes", "returns", "the", "first", "found", "DecompoundedAttributesOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/decompounded_attributes.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/sum_or_filters_scores.go
SumOrFiltersScoresEqual
func SumOrFiltersScoresEqual(o1, o2 *SumOrFiltersScoresOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func SumOrFiltersScoresEqual(o1, o2 *SumOrFiltersScoresOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "SumOrFiltersScoresEqual", "(", "o1", ",", "o2", "*", "SumOrFiltersScoresOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", "."...
// SumOrFiltersScoresEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "SumOrFiltersScoresEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the"...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/sum_or_filters_scores.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/opt/query_languages.go
QueryLanguagesEqual
func QueryLanguagesEqual(o1, o2 *QueryLanguagesOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func QueryLanguagesEqual(o1, o2 *QueryLanguagesOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "QueryLanguagesEqual", "(", "o1", ",", "o2", "*", "QueryLanguagesOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "Equ...
// QueryLanguagesEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "QueryLanguagesEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", ...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/query_languages.go#L58-L66
train
algolia/algoliasearch-client-go
algolia/opt/highlight_post_tag.go
HighlightPostTagEqual
func HighlightPostTagEqual(o1, o2 *HighlightPostTagOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func HighlightPostTagEqual(o1, o2 *HighlightPostTagOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "HighlightPostTagEqual", "(", "o1", ",", "o2", "*", "HighlightPostTagOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", ...
// HighlightPostTagEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "HighlightPostTagEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", ...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/highlight_post_tag.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/opt/length.go
LengthEqual
func LengthEqual(o1, o2 *LengthOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func LengthEqual(o1, o2 *LengthOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "LengthEqual", "(", "o1", ",", "o2", "*", "LengthOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "Equal", "(", "o...
// LengthEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "LengthEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", "default...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/length.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/internal/opt/replicas.go
ExtractReplicas
func ExtractReplicas(opts ...interface{}) *opt.ReplicasOption { for _, o := range opts { if v, ok := o.(*opt.ReplicasOption); ok { return v } } return nil }
go
func ExtractReplicas(opts ...interface{}) *opt.ReplicasOption { for _, o := range opts { if v, ok := o.(*opt.ReplicasOption); ok { return v } } return nil }
[ "func", "ExtractReplicas", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "ReplicasOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "ReplicasOption", ")", ...
// ExtractReplicas returns the first found ReplicasOption from the // given variadic arguments or nil otherwise.
[ "ExtractReplicas", "returns", "the", "first", "found", "ReplicasOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/replicas.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/auto_generate_object_id_if_not_exist.go
AutoGenerateObjectIDIfNotExistEqual
func AutoGenerateObjectIDIfNotExistEqual(o1, o2 *AutoGenerateObjectIDIfNotExistOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func AutoGenerateObjectIDIfNotExistEqual(o1, o2 *AutoGenerateObjectIDIfNotExistOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "AutoGenerateObjectIDIfNotExistEqual", "(", "o1", ",", "o2", "*", "AutoGenerateObjectIDIfNotExistOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", ...
// AutoGenerateObjectIDIfNotExistEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "AutoGenerateObjectIDIfNotExistEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/auto_generate_object_id_if_not_exist.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/internal/opt/numeric_filters.go
ExtractNumericFilters
func ExtractNumericFilters(opts ...interface{}) *opt.NumericFiltersOption { for _, o := range opts { if v, ok := o.(*opt.NumericFiltersOption); ok { return v } } return nil }
go
func ExtractNumericFilters(opts ...interface{}) *opt.NumericFiltersOption { for _, o := range opts { if v, ok := o.(*opt.NumericFiltersOption); ok { return v } } return nil }
[ "func", "ExtractNumericFilters", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "NumericFiltersOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "NumericFilte...
// ExtractNumericFilters returns the first found NumericFiltersOption from the // given variadic arguments or nil otherwise.
[ "ExtractNumericFilters", "returns", "the", "first", "found", "NumericFiltersOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/numeric_filters.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/custom_ranking.go
CustomRankingEqual
func CustomRankingEqual(o1, o2 *CustomRankingOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func CustomRankingEqual(o1, o2 *CustomRankingOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "CustomRankingEqual", "(", "o1", ",", "o2", "*", "CustomRankingOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "Equal...
// CustomRankingEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "CustomRankingEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", "...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/custom_ranking.go#L58-L66
train
algolia/algoliasearch-client-go
algolia/internal/opt/analytics.go
ExtractAnalytics
func ExtractAnalytics(opts ...interface{}) *opt.AnalyticsOption { for _, o := range opts { if v, ok := o.(*opt.AnalyticsOption); ok { return v } } return nil }
go
func ExtractAnalytics(opts ...interface{}) *opt.AnalyticsOption { for _, o := range opts { if v, ok := o.(*opt.AnalyticsOption); ok { return v } } return nil }
[ "func", "ExtractAnalytics", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "AnalyticsOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "AnalyticsOption", ")...
// ExtractAnalytics returns the first found AnalyticsOption from the // given variadic arguments or nil otherwise.
[ "ExtractAnalytics", "returns", "the", "first", "found", "AnalyticsOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/analytics.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/filters.go
FiltersEqual
func FiltersEqual(o1, o2 *FiltersOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func FiltersEqual(o1, o2 *FiltersOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "FiltersEqual", "(", "o1", ",", "o2", "*", "FiltersOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "Equal", "(", ...
// FiltersEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "FiltersEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", "defaul...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/filters.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/opt/min_word_sizefor1_typo.go
MinWordSizefor1TypoEqual
func MinWordSizefor1TypoEqual(o1, o2 *MinWordSizefor1TypoOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func MinWordSizefor1TypoEqual(o1, o2 *MinWordSizefor1TypoOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "MinWordSizefor1TypoEqual", "(", "o1", ",", "o2", "*", "MinWordSizefor1TypoOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", "...
// MinWordSizefor1TypoEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "MinWordSizefor1TypoEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/min_word_sizefor1_typo.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/opt/distinct.go
UnmarshalJSON
func (o *DistinctOption) UnmarshalJSON(data []byte) error { if string(data) == "null" { return nil } var i int if err := json.Unmarshal(data, &i); err == nil { o.value = i return nil } var b bool if err := json.Unmarshal(data, &b); err == nil { if b { o.value = 1 } else { o.value = 0 } return nil } return errs.ErrJSONDecode(data, "Distinct") }
go
func (o *DistinctOption) UnmarshalJSON(data []byte) error { if string(data) == "null" { return nil } var i int if err := json.Unmarshal(data, &i); err == nil { o.value = i return nil } var b bool if err := json.Unmarshal(data, &b); err == nil { if b { o.value = 1 } else { o.value = 0 } return nil } return errs.ErrJSONDecode(data, "Distinct") }
[ "func", "(", "o", "*", "DistinctOption", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "if", "string", "(", "data", ")", "==", "\"null\"", "{", "return", "nil", "\n", "}", "\n", "var", "i", "int", "\n", "if", "err", ":=", ...
// UnmarshalJSON implements the json.Unmarshaler interface for // DistinctOption.
[ "UnmarshalJSON", "implements", "the", "json", ".", "Unmarshaler", "interface", "for", "DistinctOption", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/distinct.go#L44-L66
train
algolia/algoliasearch-client-go
algolia/opt/distinct.go
DistinctEqual
func DistinctEqual(o1, o2 *DistinctOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func DistinctEqual(o1, o2 *DistinctOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "DistinctEqual", "(", "o1", ",", "o2", "*", "DistinctOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "Equal", "(", ...
// DistinctEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "DistinctEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", "defau...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/distinct.go#L81-L89
train
algolia/algoliasearch-client-go
algolia/opt/attributes_for_faceting.go
AttributesForFacetingEqual
func AttributesForFacetingEqual(o1, o2 *AttributesForFacetingOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func AttributesForFacetingEqual(o1, o2 *AttributesForFacetingOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "AttributesForFacetingEqual", "(", "o1", ",", "o2", "*", "AttributesForFacetingOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2",...
// AttributesForFacetingEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "AttributesForFacetingEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "t...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/attributes_for_faceting.go#L58-L66
train
algolia/algoliasearch-client-go
algolia/internal/opt/camel_case_attributes.go
ExtractCamelCaseAttributes
func ExtractCamelCaseAttributes(opts ...interface{}) *opt.CamelCaseAttributesOption { for _, o := range opts { if v, ok := o.(*opt.CamelCaseAttributesOption); ok { return v } } return nil }
go
func ExtractCamelCaseAttributes(opts ...interface{}) *opt.CamelCaseAttributesOption { for _, o := range opts { if v, ok := o.(*opt.CamelCaseAttributesOption); ok { return v } } return nil }
[ "func", "ExtractCamelCaseAttributes", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "CamelCaseAttributesOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "Ca...
// ExtractCamelCaseAttributes returns the first found CamelCaseAttributesOption from the // given variadic arguments or nil otherwise.
[ "ExtractCamelCaseAttributes", "returns", "the", "first", "found", "CamelCaseAttributesOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/camel_case_attributes.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/anchoring.go
AnchoringEqual
func AnchoringEqual(o1, o2 *AnchoringOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func AnchoringEqual(o1, o2 *AnchoringOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "AnchoringEqual", "(", "o1", ",", "o2", "*", "AnchoringOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "Equal", "("...
// AnchoringEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "AnchoringEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", "defa...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/anchoring.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/internal/opt/custom_ranking.go
ExtractCustomRanking
func ExtractCustomRanking(opts ...interface{}) *opt.CustomRankingOption { for _, o := range opts { if v, ok := o.(*opt.CustomRankingOption); ok { return v } } return nil }
go
func ExtractCustomRanking(opts ...interface{}) *opt.CustomRankingOption { for _, o := range opts { if v, ok := o.(*opt.CustomRankingOption); ok { return v } } return nil }
[ "func", "ExtractCustomRanking", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "CustomRankingOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "CustomRankingO...
// ExtractCustomRanking returns the first found CustomRankingOption from the // given variadic arguments or nil otherwise.
[ "ExtractCustomRanking", "returns", "the", "first", "found", "CustomRankingOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/custom_ranking.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/internal/opt/enable_personalization.go
ExtractEnablePersonalization
func ExtractEnablePersonalization(opts ...interface{}) *opt.EnablePersonalizationOption { for _, o := range opts { if v, ok := o.(*opt.EnablePersonalizationOption); ok { return v } } return nil }
go
func ExtractEnablePersonalization(opts ...interface{}) *opt.EnablePersonalizationOption { for _, o := range opts { if v, ok := o.(*opt.EnablePersonalizationOption); ok { return v } } return nil }
[ "func", "ExtractEnablePersonalization", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "EnablePersonalizationOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", ...
// ExtractEnablePersonalization returns the first found EnablePersonalizationOption from the // given variadic arguments or nil otherwise.
[ "ExtractEnablePersonalization", "returns", "the", "first", "found", "EnablePersonalizationOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/enable_personalization.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/ranking.go
RankingEqual
func RankingEqual(o1, o2 *RankingOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func RankingEqual(o1, o2 *RankingOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "RankingEqual", "(", "o1", ",", "o2", "*", "RankingOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "Equal", "(", ...
// RankingEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "RankingEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", "defaul...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/ranking.go#L58-L66
train
algolia/algoliasearch-client-go
algolia/internal/opt/replace_synonyms_in_highlight.go
ExtractReplaceSynonymsInHighlight
func ExtractReplaceSynonymsInHighlight(opts ...interface{}) *opt.ReplaceSynonymsInHighlightOption { for _, o := range opts { if v, ok := o.(*opt.ReplaceSynonymsInHighlightOption); ok { return v } } return nil }
go
func ExtractReplaceSynonymsInHighlight(opts ...interface{}) *opt.ReplaceSynonymsInHighlightOption { for _, o := range opts { if v, ok := o.(*opt.ReplaceSynonymsInHighlightOption); ok { return v } } return nil }
[ "func", "ExtractReplaceSynonymsInHighlight", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "ReplaceSynonymsInHighlightOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt"...
// ExtractReplaceSynonymsInHighlight returns the first found ReplaceSynonymsInHighlightOption from the // given variadic arguments or nil otherwise.
[ "ExtractReplaceSynonymsInHighlight", "returns", "the", "first", "found", "ReplaceSynonymsInHighlightOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/replace_synonyms_in_highlight.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/analytics.go
UnmarshalJSON
func (o *AnalyticsOption) UnmarshalJSON(data []byte) error { if string(data) == "null" { o.value = true return nil } return json.Unmarshal(data, &o.value) }
go
func (o *AnalyticsOption) UnmarshalJSON(data []byte) error { if string(data) == "null" { o.value = true return nil } return json.Unmarshal(data, &o.value) }
[ "func", "(", "o", "*", "AnalyticsOption", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "if", "string", "(", "data", ")", "==", "\"null\"", "{", "o", ".", "value", "=", "true", "\n", "return", "nil", "\n", "}", "\n", "retu...
// UnmarshalJSON implements the json.Unmarshaler interface for // AnalyticsOption.
[ "UnmarshalJSON", "implements", "the", "json", ".", "Unmarshaler", "interface", "for", "AnalyticsOption", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/analytics.go#L34-L40
train
algolia/algoliasearch-client-go
algolia/opt/analytics.go
AnalyticsEqual
func AnalyticsEqual(o1, o2 *AnalyticsOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func AnalyticsEqual(o1, o2 *AnalyticsOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "AnalyticsEqual", "(", "o1", ",", "o2", "*", "AnalyticsOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "Equal", "("...
// AnalyticsEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "AnalyticsEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", "defa...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/analytics.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/opt/clear_existing_rules.go
UnmarshalJSON
func (o *ClearExistingRulesOption) UnmarshalJSON(data []byte) error { if string(data) == "null" { o.value = false return nil } return json.Unmarshal(data, &o.value) }
go
func (o *ClearExistingRulesOption) UnmarshalJSON(data []byte) error { if string(data) == "null" { o.value = false return nil } return json.Unmarshal(data, &o.value) }
[ "func", "(", "o", "*", "ClearExistingRulesOption", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "if", "string", "(", "data", ")", "==", "\"null\"", "{", "o", ".", "value", "=", "false", "\n", "return", "nil", "\n", "}", "\n...
// UnmarshalJSON implements the json.Unmarshaler interface for // ClearExistingRulesOption.
[ "UnmarshalJSON", "implements", "the", "json", ".", "Unmarshaler", "interface", "for", "ClearExistingRulesOption", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/clear_existing_rules.go#L34-L40
train
algolia/algoliasearch-client-go
algolia/opt/clear_existing_rules.go
ClearExistingRulesEqual
func ClearExistingRulesEqual(o1, o2 *ClearExistingRulesOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func ClearExistingRulesEqual(o1, o2 *ClearExistingRulesOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "ClearExistingRulesEqual", "(", "o1", ",", "o2", "*", "ClearExistingRulesOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", "."...
// ClearExistingRulesEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "ClearExistingRulesEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the"...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/clear_existing_rules.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/opt/camel_case_attributes.go
CamelCaseAttributesEqual
func CamelCaseAttributesEqual(o1, o2 *CamelCaseAttributesOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func CamelCaseAttributesEqual(o1, o2 *CamelCaseAttributesOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "CamelCaseAttributesEqual", "(", "o1", ",", "o2", "*", "CamelCaseAttributesOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", "...
// CamelCaseAttributesEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "CamelCaseAttributesEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/camel_case_attributes.go#L58-L66
train
algolia/algoliasearch-client-go
algolia/opt/numeric_filters.go
NumericFiltersEqual
func NumericFiltersEqual(o1, o2 *NumericFiltersOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func NumericFiltersEqual(o1, o2 *NumericFiltersOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "NumericFiltersEqual", "(", "o1", ",", "o2", "*", "NumericFiltersOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "Equ...
// NumericFiltersEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "NumericFiltersEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", ...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/numeric_filters.go#L66-L74
train
algolia/algoliasearch-client-go
algolia/internal/opt/sort_facet_values_by.go
ExtractSortFacetValuesBy
func ExtractSortFacetValuesBy(opts ...interface{}) *opt.SortFacetValuesByOption { for _, o := range opts { if v, ok := o.(*opt.SortFacetValuesByOption); ok { return v } } return nil }
go
func ExtractSortFacetValuesBy(opts ...interface{}) *opt.SortFacetValuesByOption { for _, o := range opts { if v, ok := o.(*opt.SortFacetValuesByOption); ok { return v } } return nil }
[ "func", "ExtractSortFacetValuesBy", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "SortFacetValuesByOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "SortFa...
// ExtractSortFacetValuesBy returns the first found SortFacetValuesByOption from the // given variadic arguments or nil otherwise.
[ "ExtractSortFacetValuesBy", "returns", "the", "first", "found", "SortFacetValuesByOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/sort_facet_values_by.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/search/index_objects.go
GetObject
func (i *Index) GetObject(objectID string, object interface{}, opts ...interface{}) error { if objectID == "" { return errs.ErrMissingObjectID } opts = opt.InsertExtraURLParam( opts, "attributesToRetrieve", strings.Join(iopt.ExtractAttributesToRetrieve(opts...).Get(), ","), ) path := i.path("/" + url.QueryEscape(objectID)) return i.transport.Request(&object, http.MethodGet, path, nil, call.Read, opts...) }
go
func (i *Index) GetObject(objectID string, object interface{}, opts ...interface{}) error { if objectID == "" { return errs.ErrMissingObjectID } opts = opt.InsertExtraURLParam( opts, "attributesToRetrieve", strings.Join(iopt.ExtractAttributesToRetrieve(opts...).Get(), ","), ) path := i.path("/" + url.QueryEscape(objectID)) return i.transport.Request(&object, http.MethodGet, path, nil, call.Read, opts...) }
[ "func", "(", "i", "*", "Index", ")", "GetObject", "(", "objectID", "string", ",", "object", "interface", "{", "}", ",", "opts", "...", "interface", "{", "}", ")", "error", "{", "if", "objectID", "==", "\"\"", "{", "return", "errs", ".", "ErrMissingObje...
// GetObject retrieves the record identified by the given objectID and // deserializes it into the object parameter.
[ "GetObject", "retrieves", "the", "record", "identified", "by", "the", "given", "objectID", "and", "deserializes", "it", "into", "the", "object", "parameter", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/search/index_objects.go#L21-L34
train
algolia/algoliasearch-client-go
algolia/search/index_objects.go
SaveObject
func (i *Index) SaveObject(object interface{}, opts ...interface{}) (res SaveObjectRes, err error) { path := i.path("") err = i.transport.Request(&res, http.MethodPost, path, object, call.Write, opts...) res.wait = i.WaitTask return }
go
func (i *Index) SaveObject(object interface{}, opts ...interface{}) (res SaveObjectRes, err error) { path := i.path("") err = i.transport.Request(&res, http.MethodPost, path, object, call.Write, opts...) res.wait = i.WaitTask return }
[ "func", "(", "i", "*", "Index", ")", "SaveObject", "(", "object", "interface", "{", "}", ",", "opts", "...", "interface", "{", "}", ")", "(", "res", "SaveObjectRes", ",", "err", "error", ")", "{", "path", ":=", "i", ".", "path", "(", "\"\"", ")", ...
// SaveObject saves the given object to the index.
[ "SaveObject", "saves", "the", "given", "object", "to", "the", "index", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/search/index_objects.go#L37-L42
train
algolia/algoliasearch-client-go
algolia/search/index_objects.go
PartialUpdateObject
func (i *Index) PartialUpdateObject(object interface{}, opts ...interface{}) (res UpdateTaskRes, err error) { objectID, ok := getObjectID(object) if !ok { err = errs.ErrMissingObjectID res.wait = noWait return } opts = opt.InsertExtraURLParam( opts, "createIfNotExists", iopt.ExtractCreateIfNotExists(opts...).Get(), ) path := i.path("/" + url.QueryEscape(objectID) + "/partial") err = i.transport.Request(&res, http.MethodPost, path, object, call.Write, opts...) res.wait = i.WaitTask return }
go
func (i *Index) PartialUpdateObject(object interface{}, opts ...interface{}) (res UpdateTaskRes, err error) { objectID, ok := getObjectID(object) if !ok { err = errs.ErrMissingObjectID res.wait = noWait return } opts = opt.InsertExtraURLParam( opts, "createIfNotExists", iopt.ExtractCreateIfNotExists(opts...).Get(), ) path := i.path("/" + url.QueryEscape(objectID) + "/partial") err = i.transport.Request(&res, http.MethodPost, path, object, call.Write, opts...) res.wait = i.WaitTask return }
[ "func", "(", "i", "*", "Index", ")", "PartialUpdateObject", "(", "object", "interface", "{", "}", ",", "opts", "...", "interface", "{", "}", ")", "(", "res", "UpdateTaskRes", ",", "err", "error", ")", "{", "objectID", ",", "ok", ":=", "getObjectID", "(...
// PartialUpdateObject replaces the object content of the given object according // to its respective objectID field.
[ "PartialUpdateObject", "replaces", "the", "object", "content", "of", "the", "given", "object", "according", "to", "its", "respective", "objectID", "field", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/search/index_objects.go#L46-L64
train
algolia/algoliasearch-client-go
algolia/search/index_objects.go
GetObjects
func (i *Index) GetObjects(objectIDs []string, objects interface{}, opts ...interface{}) error { var ( attributesToRetrieve = iopt.ExtractAttributesToRetrieve(opts...) requests = make([]getObjectsReq, len(objectIDs)) body = map[string]interface{}{"requests": requests} res = getObjectsRes{objects} ) for j, objectID := range objectIDs { requests[j] = getObjectsReq{ IndexName: i.name, ObjectID: objectID, AttributesToRetrieve: attributesToRetrieve, } } path := "/1/indexes/*/objects" return i.transport.Request(&res, http.MethodPost, path, body, call.Read, opts...) }
go
func (i *Index) GetObjects(objectIDs []string, objects interface{}, opts ...interface{}) error { var ( attributesToRetrieve = iopt.ExtractAttributesToRetrieve(opts...) requests = make([]getObjectsReq, len(objectIDs)) body = map[string]interface{}{"requests": requests} res = getObjectsRes{objects} ) for j, objectID := range objectIDs { requests[j] = getObjectsReq{ IndexName: i.name, ObjectID: objectID, AttributesToRetrieve: attributesToRetrieve, } } path := "/1/indexes/*/objects" return i.transport.Request(&res, http.MethodPost, path, body, call.Read, opts...) }
[ "func", "(", "i", "*", "Index", ")", "GetObjects", "(", "objectIDs", "[", "]", "string", ",", "objects", "interface", "{", "}", ",", "opts", "...", "interface", "{", "}", ")", "error", "{", "var", "(", "attributesToRetrieve", "=", "iopt", ".", "Extract...
// GetObjects retrieves the records identified by the given objectIDs and // deserializes them into the objects parameter.
[ "GetObjects", "retrieves", "the", "records", "identified", "by", "the", "given", "objectIDs", "and", "deserializes", "them", "into", "the", "objects", "parameter", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/search/index_objects.go#L82-L100
train
algolia/algoliasearch-client-go
algolia/search/index_objects.go
DeleteObjects
func (i *Index) DeleteObjects(objectIDs []string, opts ...interface{}) (res BatchRes, err error) { objects := make([]interface{}, len(objectIDs)) for j, id := range objectIDs { objects[j] = map[string]string{"objectID": id} } var operations []BatchOperation if operations, err = newOperationBatch(objects, DeleteObject); err == nil { res, err = i.Batch(operations, opts...) } else { res.wait = noWait } return }
go
func (i *Index) DeleteObjects(objectIDs []string, opts ...interface{}) (res BatchRes, err error) { objects := make([]interface{}, len(objectIDs)) for j, id := range objectIDs { objects[j] = map[string]string{"objectID": id} } var operations []BatchOperation if operations, err = newOperationBatch(objects, DeleteObject); err == nil { res, err = i.Batch(operations, opts...) } else { res.wait = noWait } return }
[ "func", "(", "i", "*", "Index", ")", "DeleteObjects", "(", "objectIDs", "[", "]", "string", ",", "opts", "...", "interface", "{", "}", ")", "(", "res", "BatchRes", ",", "err", "error", ")", "{", "objects", ":=", "make", "(", "[", "]", "interface", ...
// DeleteObjects removes the records identified by the given objectIDs.
[ "DeleteObjects", "removes", "the", "records", "identified", "by", "the", "given", "objectIDs", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/search/index_objects.go#L137-L151
train
algolia/algoliasearch-client-go
algolia/search/index_objects.go
Batch
func (i *Index) Batch(operations []BatchOperation, opts ...interface{}) (res BatchRes, err error) { body := batchReq{Requests: operations} path := i.path("/batch") err = i.transport.Request(&res, http.MethodPost, path, body, call.Write, opts...) res.wait = i.WaitTask return }
go
func (i *Index) Batch(operations []BatchOperation, opts ...interface{}) (res BatchRes, err error) { body := batchReq{Requests: operations} path := i.path("/batch") err = i.transport.Request(&res, http.MethodPost, path, body, call.Write, opts...) res.wait = i.WaitTask return }
[ "func", "(", "i", "*", "Index", ")", "Batch", "(", "operations", "[", "]", "BatchOperation", ",", "opts", "...", "interface", "{", "}", ")", "(", "res", "BatchRes", ",", "err", "error", ")", "{", "body", ":=", "batchReq", "{", "Requests", ":", "opera...
// Batch sends all the given indexing operations with a single call.
[ "Batch", "sends", "all", "the", "given", "indexing", "operations", "with", "a", "single", "call", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/search/index_objects.go#L198-L204
train
algolia/algoliasearch-client-go
algolia/search/index_objects.go
Search
func (i *Index) Search(query string, opts ...interface{}) (res QueryRes, err error) { body := searchReq{Params: transport.URLEncode(newSearchParams(query, opts...))} path := i.path("/query") err = i.transport.Request(&res, http.MethodPost, path, body, call.Read, opts...) return }
go
func (i *Index) Search(query string, opts ...interface{}) (res QueryRes, err error) { body := searchReq{Params: transport.URLEncode(newSearchParams(query, opts...))} path := i.path("/query") err = i.transport.Request(&res, http.MethodPost, path, body, call.Read, opts...) return }
[ "func", "(", "i", "*", "Index", ")", "Search", "(", "query", "string", ",", "opts", "...", "interface", "{", "}", ")", "(", "res", "QueryRes", ",", "err", "error", ")", "{", "body", ":=", "searchReq", "{", "Params", ":", "transport", ".", "URLEncode"...
// Search performs a search query according to the given query string and any // given query parameter among all the index records.
[ "Search", "performs", "a", "search", "query", "according", "to", "the", "given", "query", "string", "and", "any", "given", "query", "parameter", "among", "all", "the", "index", "records", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/search/index_objects.go#L221-L226
train
algolia/algoliasearch-client-go
algolia/search/index_objects.go
SearchForFacetValues
func (i *Index) SearchForFacetValues(facet, query string, opts ...interface{}) (res SearchForFacetValuesRes, err error) { params := newSearchForFacetValuesParams(query, opts...) body := map[string]string{ "params": transport.URLEncode(params), } path := i.path("/facets/%s/query", facet) err = i.transport.Request(&res, http.MethodPost, path, body, call.Read, opts...) return }
go
func (i *Index) SearchForFacetValues(facet, query string, opts ...interface{}) (res SearchForFacetValuesRes, err error) { params := newSearchForFacetValuesParams(query, opts...) body := map[string]string{ "params": transport.URLEncode(params), } path := i.path("/facets/%s/query", facet) err = i.transport.Request(&res, http.MethodPost, path, body, call.Read, opts...) return }
[ "func", "(", "i", "*", "Index", ")", "SearchForFacetValues", "(", "facet", ",", "query", "string", ",", "opts", "...", "interface", "{", "}", ")", "(", "res", "SearchForFacetValuesRes", ",", "err", "error", ")", "{", "params", ":=", "newSearchForFacetValuesP...
// SearchForFacetValues performs a search query according to the given query // string and any given parameter among the values of the given facet.
[ "SearchForFacetValues", "performs", "a", "search", "query", "according", "to", "the", "given", "query", "string", "and", "any", "given", "parameter", "among", "the", "values", "of", "the", "given", "facet", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/search/index_objects.go#L230-L238
train
algolia/algoliasearch-client-go
algolia/opt/attribute_for_distinct.go
AttributeForDistinctEqual
func AttributeForDistinctEqual(o1, o2 *AttributeForDistinctOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func AttributeForDistinctEqual(o1, o2 *AttributeForDistinctOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "AttributeForDistinctEqual", "(", "o1", ",", "o2", "*", "AttributeForDistinctOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ...
// AttributeForDistinctEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "AttributeForDistinctEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "th...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/attribute_for_distinct.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/opt/facet_filters.go
FacetFiltersEqual
func FacetFiltersEqual(o1, o2 *FacetFiltersOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func FacetFiltersEqual(o1, o2 *FacetFiltersOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "FacetFiltersEqual", "(", "o1", ",", "o2", "*", "FacetFiltersOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "Equal",...
// FacetFiltersEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "FacetFiltersEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", "d...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/facet_filters.go#L66-L74
train
algolia/algoliasearch-client-go
algolia/internal/opt/remove_stop_words.go
ExtractRemoveStopWords
func ExtractRemoveStopWords(opts ...interface{}) *opt.RemoveStopWordsOption { for _, o := range opts { if v, ok := o.(*opt.RemoveStopWordsOption); ok { return v } } return nil }
go
func ExtractRemoveStopWords(opts ...interface{}) *opt.RemoveStopWordsOption { for _, o := range opts { if v, ok := o.(*opt.RemoveStopWordsOption); ok { return v } } return nil }
[ "func", "ExtractRemoveStopWords", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "RemoveStopWordsOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "RemoveStop...
// ExtractRemoveStopWords returns the first found RemoveStopWordsOption from the // given variadic arguments or nil otherwise.
[ "ExtractRemoveStopWords", "returns", "the", "first", "found", "RemoveStopWordsOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/remove_stop_words.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/internal/opt/attribute_for_distinct.go
ExtractAttributeForDistinct
func ExtractAttributeForDistinct(opts ...interface{}) *opt.AttributeForDistinctOption { for _, o := range opts { if v, ok := o.(*opt.AttributeForDistinctOption); ok { return v } } return nil }
go
func ExtractAttributeForDistinct(opts ...interface{}) *opt.AttributeForDistinctOption { for _, o := range opts { if v, ok := o.(*opt.AttributeForDistinctOption); ok { return v } } return nil }
[ "func", "ExtractAttributeForDistinct", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "AttributeForDistinctOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "...
// ExtractAttributeForDistinct returns the first found AttributeForDistinctOption from the // given variadic arguments or nil otherwise.
[ "ExtractAttributeForDistinct", "returns", "the", "first", "found", "AttributeForDistinctOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/attribute_for_distinct.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/internal/opt/remove_words_if_no_results.go
ExtractRemoveWordsIfNoResults
func ExtractRemoveWordsIfNoResults(opts ...interface{}) *opt.RemoveWordsIfNoResultsOption { for _, o := range opts { if v, ok := o.(*opt.RemoveWordsIfNoResultsOption); ok { return v } } return nil }
go
func ExtractRemoveWordsIfNoResults(opts ...interface{}) *opt.RemoveWordsIfNoResultsOption { for _, o := range opts { if v, ok := o.(*opt.RemoveWordsIfNoResultsOption); ok { return v } } return nil }
[ "func", "ExtractRemoveWordsIfNoResults", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "RemoveWordsIfNoResultsOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".",...
// ExtractRemoveWordsIfNoResults returns the first found RemoveWordsIfNoResultsOption from the // given variadic arguments or nil otherwise.
[ "ExtractRemoveWordsIfNoResults", "returns", "the", "first", "found", "RemoveWordsIfNoResultsOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/remove_words_if_no_results.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/click_analytics.go
ClickAnalyticsEqual
func ClickAnalyticsEqual(o1, o2 *ClickAnalyticsOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func ClickAnalyticsEqual(o1, o2 *ClickAnalyticsOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "ClickAnalyticsEqual", "(", "o1", ",", "o2", "*", "ClickAnalyticsOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "Equ...
// ClickAnalyticsEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "ClickAnalyticsEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", ...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/click_analytics.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/opt/alternatives_as_exact.go
AlternativesAsExactEqual
func AlternativesAsExactEqual(o1, o2 *AlternativesAsExactOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func AlternativesAsExactEqual(o1, o2 *AlternativesAsExactOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "AlternativesAsExactEqual", "(", "o1", ",", "o2", "*", "AlternativesAsExactOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", "...
// AlternativesAsExactEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "AlternativesAsExactEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/alternatives_as_exact.go#L58-L66
train
algolia/algoliasearch-client-go
algolia/internal/opt/rule_contexts.go
ExtractRuleContexts
func ExtractRuleContexts(opts ...interface{}) *opt.RuleContextsOption { for _, o := range opts { if v, ok := o.(*opt.RuleContextsOption); ok { return v } } return nil }
go
func ExtractRuleContexts(opts ...interface{}) *opt.RuleContextsOption { for _, o := range opts { if v, ok := o.(*opt.RuleContextsOption); ok { return v } } return nil }
[ "func", "ExtractRuleContexts", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "RuleContextsOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "RuleContextsOpti...
// ExtractRuleContexts returns the first found RuleContextsOption from the // given variadic arguments or nil otherwise.
[ "ExtractRuleContexts", "returns", "the", "first", "found", "RuleContextsOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/rule_contexts.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/min_proximity.go
MinProximityEqual
func MinProximityEqual(o1, o2 *MinProximityOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func MinProximityEqual(o1, o2 *MinProximityOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "MinProximityEqual", "(", "o1", ",", "o2", "*", "MinProximityOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "Equal",...
// MinProximityEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "MinProximityEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", "d...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/min_proximity.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/opt/max_facet_hits.go
MaxFacetHitsEqual
func MaxFacetHitsEqual(o1, o2 *MaxFacetHitsOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func MaxFacetHitsEqual(o1, o2 *MaxFacetHitsOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "MaxFacetHitsEqual", "(", "o1", ",", "o2", "*", "MaxFacetHitsOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "Equal",...
// MaxFacetHitsEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "MaxFacetHitsEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", "d...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/max_facet_hits.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/internal/opt/max_values_per_facet.go
ExtractMaxValuesPerFacet
func ExtractMaxValuesPerFacet(opts ...interface{}) *opt.MaxValuesPerFacetOption { for _, o := range opts { if v, ok := o.(*opt.MaxValuesPerFacetOption); ok { return v } } return nil }
go
func ExtractMaxValuesPerFacet(opts ...interface{}) *opt.MaxValuesPerFacetOption { for _, o := range opts { if v, ok := o.(*opt.MaxValuesPerFacetOption); ok { return v } } return nil }
[ "func", "ExtractMaxValuesPerFacet", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "MaxValuesPerFacetOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "MaxVal...
// ExtractMaxValuesPerFacet returns the first found MaxValuesPerFacetOption from the // given variadic arguments or nil otherwise.
[ "ExtractMaxValuesPerFacet", "returns", "the", "first", "found", "MaxValuesPerFacetOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/max_values_per_facet.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/internal/opt/highlight_post_tag.go
ExtractHighlightPostTag
func ExtractHighlightPostTag(opts ...interface{}) *opt.HighlightPostTagOption { for _, o := range opts { if v, ok := o.(*opt.HighlightPostTagOption); ok { return v } } return nil }
go
func ExtractHighlightPostTag(opts ...interface{}) *opt.HighlightPostTagOption { for _, o := range opts { if v, ok := o.(*opt.HighlightPostTagOption); ok { return v } } return nil }
[ "func", "ExtractHighlightPostTag", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "HighlightPostTagOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "Highligh...
// ExtractHighlightPostTag returns the first found HighlightPostTagOption from the // given variadic arguments or nil otherwise.
[ "ExtractHighlightPostTag", "returns", "the", "first", "found", "HighlightPostTagOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/highlight_post_tag.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/internal/opt/optional_words.go
ExtractOptionalWords
func ExtractOptionalWords(opts ...interface{}) *opt.OptionalWordsOption { for _, o := range opts { if v, ok := o.(*opt.OptionalWordsOption); ok { return v } } return nil }
go
func ExtractOptionalWords(opts ...interface{}) *opt.OptionalWordsOption { for _, o := range opts { if v, ok := o.(*opt.OptionalWordsOption); ok { return v } } return nil }
[ "func", "ExtractOptionalWords", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "OptionalWordsOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "OptionalWordsO...
// ExtractOptionalWords returns the first found OptionalWordsOption from the // given variadic arguments or nil otherwise.
[ "ExtractOptionalWords", "returns", "the", "first", "found", "OptionalWordsOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/optional_words.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/internal/opt/analytics_tags.go
ExtractAnalyticsTags
func ExtractAnalyticsTags(opts ...interface{}) *opt.AnalyticsTagsOption { for _, o := range opts { if v, ok := o.(*opt.AnalyticsTagsOption); ok { return v } } return nil }
go
func ExtractAnalyticsTags(opts ...interface{}) *opt.AnalyticsTagsOption { for _, o := range opts { if v, ok := o.(*opt.AnalyticsTagsOption); ok { return v } } return nil }
[ "func", "ExtractAnalyticsTags", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "AnalyticsTagsOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "AnalyticsTagsO...
// ExtractAnalyticsTags returns the first found AnalyticsTagsOption from the // given variadic arguments or nil otherwise.
[ "ExtractAnalyticsTags", "returns", "the", "first", "found", "AnalyticsTagsOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/analytics_tags.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/get_ranking_info.go
GetRankingInfoEqual
func GetRankingInfoEqual(o1, o2 *GetRankingInfoOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func GetRankingInfoEqual(o1, o2 *GetRankingInfoOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "GetRankingInfoEqual", "(", "o1", ",", "o2", "*", "GetRankingInfoOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "Equ...
// GetRankingInfoEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "GetRankingInfoEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", ...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/get_ranking_info.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/internal/opt/query.go
ExtractQuery
func ExtractQuery(opts ...interface{}) *opt.QueryOption { for _, o := range opts { if v, ok := o.(*opt.QueryOption); ok { return v } } return nil }
go
func ExtractQuery(opts ...interface{}) *opt.QueryOption { for _, o := range opts { if v, ok := o.(*opt.QueryOption); ok { return v } } return nil }
[ "func", "ExtractQuery", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "QueryOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "QueryOption", ")", ";", ...
// ExtractQuery returns the first found QueryOption from the // given variadic arguments or nil otherwise.
[ "ExtractQuery", "returns", "the", "first", "found", "QueryOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/query.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/internal/opt/forward_to_replicas.go
ExtractForwardToReplicas
func ExtractForwardToReplicas(opts ...interface{}) *opt.ForwardToReplicasOption { for _, o := range opts { if v, ok := o.(*opt.ForwardToReplicasOption); ok { return v } } return nil }
go
func ExtractForwardToReplicas(opts ...interface{}) *opt.ForwardToReplicasOption { for _, o := range opts { if v, ok := o.(*opt.ForwardToReplicasOption); ok { return v } } return nil }
[ "func", "ExtractForwardToReplicas", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "ForwardToReplicasOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "Forwar...
// ExtractForwardToReplicas returns the first found ForwardToReplicasOption from the // given variadic arguments or nil otherwise.
[ "ExtractForwardToReplicas", "returns", "the", "first", "found", "ForwardToReplicasOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/forward_to_replicas.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/advanced.go
AdvancedEqual
func AdvancedEqual(o1, o2 *AdvancedOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func AdvancedEqual(o1, o2 *AdvancedOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "AdvancedEqual", "(", "o1", ",", "o2", "*", "AdvancedOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "Equal", "(", ...
// AdvancedEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "AdvancedEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", "defau...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/advanced.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/internal/opt/click_analytics.go
ExtractClickAnalytics
func ExtractClickAnalytics(opts ...interface{}) *opt.ClickAnalyticsOption { for _, o := range opts { if v, ok := o.(*opt.ClickAnalyticsOption); ok { return v } } return nil }
go
func ExtractClickAnalytics(opts ...interface{}) *opt.ClickAnalyticsOption { for _, o := range opts { if v, ok := o.(*opt.ClickAnalyticsOption); ok { return v } } return nil }
[ "func", "ExtractClickAnalytics", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "ClickAnalyticsOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "ClickAnalyti...
// ExtractClickAnalytics returns the first found ClickAnalyticsOption from the // given variadic arguments or nil otherwise.
[ "ExtractClickAnalytics", "returns", "the", "first", "found", "ClickAnalyticsOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/click_analytics.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/internal/opt/unretrievable_attributes.go
ExtractUnretrievableAttributes
func ExtractUnretrievableAttributes(opts ...interface{}) *opt.UnretrievableAttributesOption { for _, o := range opts { if v, ok := o.(*opt.UnretrievableAttributesOption); ok { return v } } return nil }
go
func ExtractUnretrievableAttributes(opts ...interface{}) *opt.UnretrievableAttributesOption { for _, o := range opts { if v, ok := o.(*opt.UnretrievableAttributesOption); ok { return v } } return nil }
[ "func", "ExtractUnretrievableAttributes", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "UnretrievableAttributesOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", "....
// ExtractUnretrievableAttributes returns the first found UnretrievableAttributesOption from the // given variadic arguments or nil otherwise.
[ "ExtractUnretrievableAttributes", "returns", "the", "first", "found", "UnretrievableAttributesOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/unretrievable_attributes.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/internal/opt/searchable_attributes.go
ExtractSearchableAttributes
func ExtractSearchableAttributes(opts ...interface{}) *opt.SearchableAttributesOption { for _, o := range opts { if v, ok := o.(*opt.SearchableAttributesOption); ok { return v } } return nil }
go
func ExtractSearchableAttributes(opts ...interface{}) *opt.SearchableAttributesOption { for _, o := range opts { if v, ok := o.(*opt.SearchableAttributesOption); ok { return v } } return nil }
[ "func", "ExtractSearchableAttributes", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "SearchableAttributesOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "...
// ExtractSearchableAttributes returns the first found SearchableAttributesOption from the // given variadic arguments or nil otherwise.
[ "ExtractSearchableAttributes", "returns", "the", "first", "found", "SearchableAttributesOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/searchable_attributes.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/internal/opt/advanced.go
ExtractAdvanced
func ExtractAdvanced(opts ...interface{}) *opt.AdvancedOption { for _, o := range opts { if v, ok := o.(*opt.AdvancedOption); ok { return v } } return nil }
go
func ExtractAdvanced(opts ...interface{}) *opt.AdvancedOption { for _, o := range opts { if v, ok := o.(*opt.AdvancedOption); ok { return v } } return nil }
[ "func", "ExtractAdvanced", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "AdvancedOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "AdvancedOption", ")", ...
// ExtractAdvanced returns the first found AdvancedOption from the // given variadic arguments or nil otherwise.
[ "ExtractAdvanced", "returns", "the", "first", "found", "AdvancedOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/advanced.go#L11-L18
train