getUserAgentInfo returns the standard user agent info plus Algolia CLI
(appID string, apiKey string, appVersion string)
| 118 | |
| 119 | // getUserAgentInfo returns the standard user agent info plus Algolia CLI |
| 120 | func 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 |
| 129 | func GetStatefulHosts(hosts []string) []transport.StatefulHost { |
no outgoing calls
no test coverage detected