MCPcopy Create free account
hub / github.com/algolia/cli / getUserAgentInfo

Function getUserAgentInfo

pkg/cmd/factory/default.go:120–126  ·  view source on GitHub ↗

getUserAgentInfo returns the standard user agent info plus Algolia CLI

(appID string, apiKey string, appVersion string)

Source from the content-addressed store, hash-verified

118
119// getUserAgentInfo returns the standard user agent info plus Algolia CLI
120func getUserAgentInfo(appID string, apiKey string, appVersion string) (string, error) {
121 client, err := search.NewClient(appID, apiKey)
122 if err != nil {
123 return "", err
124 }
125 return client.GetConfiguration().UserAgent + fmt.Sprintf("; Algolia CLI (%s)", appVersion), nil
126}
127
128// GetStatefulHosts reads the hosts information from the profile and turns into the right structure
129func GetStatefulHosts(hosts []string) []transport.StatefulHost {

Callers 2

searchClientFunction · 0.70
compositionClientFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected