Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.54.2
version: v1.64.8
args: -v -c .golangci.yml
only-new-issues: true

Expand Down
4 changes: 1 addition & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ linters:
- errchkjson
- errname
- errorlint
- execinquery
- exhaustive
- exportloopref
- gci
- ginkgolinter
- gocheckcompilerdirectives
Expand Down Expand Up @@ -159,7 +157,7 @@ issues:
path: _test\.go
- linters:
- goconst
path: opensearchapi\/api_
path: -params\.go
- linters:
- errcheck
text: "Error return value of `debugLogger.Logf` is not checked"
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Add more SuggestOptions to SearchResp ([#713](https://github.com/opensearch-project/opensearch-go/pull/713))
- Updates Go version to 1.24 ([#674](https://github.com/opensearch-project/opensearch-go/pull/674))
- Replace `golang.org/x/exp/slices` usage with built-in `slices` ([#674](https://github.com/opensearch-project/opensearch-go/pull/674))
- Update golangci-linter to 1.64.8 ([#740](https://github.com/opensearch-project/opensearch-go/pull/740))
- Change MaxScore to pointer ([#740](https://github.com/opensearch-project/opensearch-go/pull/740))

### Deprecated

Expand Down Expand Up @@ -316,7 +318,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Uses `[]string` instead of `string` in `SnapshotDeleteRequest` ([#237](https://github.com/opensearch-project/opensearch-go/pull/237))
- Updates workflows to reduce CI time, consolidate OpenSearch versions, update compatibility matrix ([#242](https://github.com/opensearch-project/opensearch-go/pull/242))
- Moves @svencowart to emeritus maintainers ([#270](https://github.com/opensearch-project/opensearch-go/pull/270))
- Reads, closes and replaces the http Reponse Body ([#300](https://github.com/opensearch-project/opensearch-go/pull/300))
- Reads, closes and replaces the http Response Body ([#300](https://github.com/opensearch-project/opensearch-go/pull/300))

### Fixed

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ cluster.clean: ## Remove unused Docker volumes and networks
docker system prune --volumes --force

linters:
docker run -t --rm -v $$(pwd):/app -v ~/.cache/golangci-lint/v1.54.2:/root/.cache -w /app golangci/golangci-lint:v1.54.2 golangci-lint run --timeout=5m
docker run -t --rm -v $$(pwd):/app -v ~/.cache/golangci-lint/v1.64.8:/root/.cache -w /app golangci/golangci-lint:v1.64.8 golangci-lint run --timeout=5m

workflow: ## Run all github workflow commands here sequentially

Expand Down
6 changes: 1 addition & 5 deletions internal/test/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,7 @@ func NewClient() (*opensearchapi.Client, error) {

// IsSecure returns true when SECURE_INTEGRATION env is set to true
func IsSecure() bool {
//nolint:gosimple // Getenv returns string not bool, if clause is needed
if os.Getenv("SECURE_INTEGRATION") == "true" {
return true
}
return false
return os.Getenv("SECURE_INTEGRATION") == "true"
}

// ClientConfig returns an opensearchapi.Config for secure opensearch
Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ type AliasesResp struct {
response *opensearch.Response
}

// Inspect returns the Inspect type containing the raw *opensearch.Reponse
// Inspect returns the Inspect type containing the raw *opensearch.Response
func (r AliasesResp) Inspect() Inspect {
return Inspect{Response: r.response}
}
2 changes: 1 addition & 1 deletion opensearchapi/api_bulk.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ type BulkRespItem struct {
} `json:"error,omitempty"`
}

// Inspect returns the Inspect type containing the raw *opensearch.Reponse
// Inspect returns the Inspect type containing the raw *opensearch.Response
func (r BulkResp) Inspect() Inspect {
return Inspect{Response: r.response}
}
2 changes: 1 addition & 1 deletion opensearchapi/api_cat-aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ type CatAliasResp struct {
IsWriteIndex string `json:"is_write_index"`
}

// Inspect returns the Inspect type containing the raw *opensearch.Reponse
// Inspect returns the Inspect type containing the raw *opensearch.Response
func (r CatAliasesResp) Inspect() Inspect {
return Inspect{
Response: r.response,
Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_cat-allocation.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ type CatAllocationResp struct {
Node string `json:"node"`
}

// Inspect returns the Inspect type containing the raw *opensearch.Reponse
// Inspect returns the Inspect type containing the raw *opensearch.Response
func (r CatAllocationsResp) Inspect() Inspect {
return Inspect{
Response: r.response,
Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_cat-cluster_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ type CatClusterManagerResp struct {
Node string `json:"node"`
}

// Inspect returns the Inspect type containing the raw *opensearch.Reponse
// Inspect returns the Inspect type containing the raw *opensearch.Response
func (r CatClusterManagersResp) Inspect() Inspect {
return Inspect{
Response: r.response,
Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_cat-count.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ type CatCountResp struct {
Count int `json:"count,string"`
}

// Inspect returns the Inspect type containing the raw *opensearch.Reponse
// Inspect returns the Inspect type containing the raw *opensearch.Response
func (r CatCountsResp) Inspect() Inspect {
return Inspect{
Response: r.response,
Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_cat-fielddata.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ type CatFieldDataItemResp struct {
Size string `json:"size"`
}

// Inspect returns the Inspect type containing the raw *opensearch.Reponse
// Inspect returns the Inspect type containing the raw *opensearch.Response
func (r CatFieldDataResp) Inspect() Inspect {
return Inspect{
Response: r.response,
Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_cat-health.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ type CatHealthItemResp struct {
ActiveShardsPercent string `json:"active_shards_percent"`
}

// Inspect returns the Inspect type containing the raw *opensearch.Reponse
// Inspect returns the Inspect type containing the raw *opensearch.Response
func (r CatHealthResp) Inspect() Inspect {
return Inspect{
Response: r.response,
Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_cat-indices.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ type CatIndexResp struct {
SearchThrottled bool `json:"search.throttled,string"`
}

// Inspect returns the Inspect type containing the raw *opensearch.Reponse
// Inspect returns the Inspect type containing the raw *opensearch.Response
func (r CatIndicesResp) Inspect() Inspect {
return Inspect{
Response: r.response,
Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_cat-master.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ type CatMasterItemResp struct {
Node string `json:"node"`
}

// Inspect returns the Inspect type containing the raw *opensearch.Reponse
// Inspect returns the Inspect type containing the raw *opensearch.Response
func (r CatMasterResp) Inspect() Inspect {
return Inspect{
Response: r.response,
Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_cat-nodeattrs.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ type CatNodeAttrsItemResp struct {
Value string `json:"value"`
}

// Inspect returns the Inspect type containing the raw *opensearch.Reponse
// Inspect returns the Inspect type containing the raw *opensearch.Response
func (r CatNodeAttrsResp) Inspect() Inspect {
return Inspect{
Response: r.response,
Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_cat-nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ type CatNodesItemResp struct {
SuggestTotal *int `json:"suggest.total,string"`
}

// Inspect returns the Inspect type containing the raw *opensearch.Reponse
// Inspect returns the Inspect type containing the raw *opensearch.Response
func (r CatNodesResp) Inspect() Inspect {
return Inspect{
Response: r.response,
Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_cat-pending_tasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ type CatPendingTaskResp struct {
Source string `json:"source"`
}

// Inspect returns the Inspect type containing the raw *opensearch.Reponse
// Inspect returns the Inspect type containing the raw *opensearch.Response
func (r CatPendingTasksResp) Inspect() Inspect {
return Inspect{
Response: r.response,
Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_cat-plugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ type CatPluginResp struct {
Description string `json:"description,omitempty"`
}

// Inspect returns the Inspect type containing the raw *opensearch.Reponse
// Inspect returns the Inspect type containing the raw *opensearch.Response
func (r CatPluginsResp) Inspect() Inspect {
return Inspect{
Response: r.response,
Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_cat-recovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ type CatRecoveryItemResp struct {
TranslogOpsPercent string `json:"translog_ops_percent"`
}

// Inspect returns the Inspect type containing the raw *opensearch.Reponse
// Inspect returns the Inspect type containing the raw *opensearch.Response
func (r CatRecoveryResp) Inspect() Inspect {
return Inspect{
Response: r.response,
Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_cat-repositories.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ type CatRepositorieResp struct {
Type string `json:"type"`
}

// Inspect returns the Inspect type containing the raw *opensearch.Reponse
// Inspect returns the Inspect type containing the raw *opensearch.Response
func (r CatRepositoriesResp) Inspect() Inspect {
return Inspect{
Response: r.response,
Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_cat-segments.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ type CatSegmentResp struct {
Compound bool `json:"compound,string"`
}

// Inspect returns the Inspect type containing the raw *opensearch.Reponse
// Inspect returns the Inspect type containing the raw *opensearch.Response
func (r CatSegmentsResp) Inspect() Inspect {
return Inspect{
Response: r.response,
Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_cat-shards.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ type CatShardResp struct {
DocsDeleted *int `json:"docs.deleted,string"`
}

// Inspect returns the Inspect type containing the raw *opensearch.Reponse
// Inspect returns the Inspect type containing the raw *opensearch.Response
func (r CatShardsResp) Inspect() Inspect {
return Inspect{
Response: r.response,
Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_cat-snapshots.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ type CatSnapshotResp struct {
Reason string `json:"reason"`
}

// Inspect returns the Inspect type containing the raw *opensearch.Reponse
// Inspect returns the Inspect type containing the raw *opensearch.Response
func (r CatSnapshotsResp) Inspect() Inspect {
return Inspect{
Response: r.response,
Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_cat-tasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ type CatTaskResp struct {
XOpaqueID string `json:"x_opaque_id"`
}

// Inspect returns the Inspect type containing the raw *opensearch.Reponse
// Inspect returns the Inspect type containing the raw *opensearch.Response
func (r CatTasksResp) Inspect() Inspect {
return Inspect{
Response: r.response,
Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_cat-templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ type CatTemplateResp struct {
ComposedOf string `json:"composed_of"`
}

// Inspect returns the Inspect type containing the raw *opensearch.Reponse
// Inspect returns the Inspect type containing the raw *opensearch.Response
func (r CatTemplatesResp) Inspect() Inspect {
return Inspect{
Response: r.response,
Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_cat-thread_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ type CatThreadPoolItemResp struct {
TotalWaitTime string `json:"total_wait_time"`
}

// Inspect returns the Inspect type containing the raw *opensearch.Reponse
// Inspect returns the Inspect type containing the raw *opensearch.Response
func (r CatThreadPoolResp) Inspect() Inspect {
return Inspect{
Response: r.response,
Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_cluster-allocation_explain.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ type ClusterAllocationExplainResp struct {
response *opensearch.Response
}

// Inspect returns the Inspect type containing the raw *opensearch.Reponse
// Inspect returns the Inspect type containing the raw *opensearch.Response
func (r ClusterAllocationExplainResp) Inspect() Inspect {
return Inspect{Response: r.response}
}
Expand Down
6 changes: 3 additions & 3 deletions opensearchapi/api_cluster-decommission.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ type ClusterPutDecommissionResp struct {
response *opensearch.Response
}

// Inspect returns the Inspect type containing the raw *opensearch.Reponse
// Inspect returns the Inspect type containing the raw *opensearch.Response
func (r ClusterPutDecommissionResp) Inspect() Inspect {
return Inspect{Response: r.response}
}
Expand Down Expand Up @@ -74,7 +74,7 @@ type ClusterDeleteDecommissionResp struct {
response *opensearch.Response
}

// Inspect returns the Inspect type containing the raw *opensearch.Reponse
// Inspect returns the Inspect type containing the raw *opensearch.Response
func (r ClusterDeleteDecommissionResp) Inspect() Inspect {
return Inspect{Response: r.response}
}
Expand Down Expand Up @@ -110,7 +110,7 @@ type ClusterGetDecommissionResp struct {
response *opensearch.Response
}

// Inspect returns the Inspect type containing the raw *opensearch.Reponse
// Inspect returns the Inspect type containing the raw *opensearch.Response
func (r ClusterGetDecommissionResp) Inspect() Inspect {
return Inspect{Response: r.response}
}
2 changes: 1 addition & 1 deletion opensearchapi/api_cluster-health.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ type ClusterHealthResp struct {
response *opensearch.Response
}

// Inspect returns the Inspect type containing the raw *opensearch.Reponse
// Inspect returns the Inspect type containing the raw *opensearch.Response
func (r ClusterHealthResp) Inspect() Inspect {
return Inspect{Response: r.response}
}
2 changes: 1 addition & 1 deletion opensearchapi/api_cluster-pending_tasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type ClusterPendingTasksResp struct {
response *opensearch.Response
}

// Inspect returns the Inspect type containing the raw *opensearch.Reponse
// Inspect returns the Inspect type containing the raw *opensearch.Response
func (r ClusterPendingTasksResp) Inspect() Inspect {
return Inspect{Response: r.response}
}
Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_cluster-remote_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type ClusterRemoteInfoResp struct {
response *opensearch.Response
}

// Inspect returns the Inspect type containing the raw *opensearch.Reponse
// Inspect returns the Inspect type containing the raw *opensearch.Response
func (r ClusterRemoteInfoResp) Inspect() Inspect {
return Inspect{Response: r.response}
}
Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_cluster-reroute.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type ClusterRerouteResp struct {
response *opensearch.Response
}

// Inspect returns the Inspect type containing the raw *opensearch.Reponse
// Inspect returns the Inspect type containing the raw *opensearch.Response
func (r ClusterRerouteResp) Inspect() Inspect {
return Inspect{Response: r.response}
}
Expand Down
4 changes: 2 additions & 2 deletions opensearchapi/api_cluster-settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type ClusterGetSettingsResp struct {
response *opensearch.Response
}

// Inspect returns the Inspect type containing the raw *opensearch.Reponse
// Inspect returns the Inspect type containing the raw *opensearch.Response
func (r ClusterGetSettingsResp) Inspect() Inspect {
return Inspect{Response: r.response}
}
Expand Down Expand Up @@ -70,7 +70,7 @@ type ClusterPutSettingsResp struct {
response *opensearch.Response
}

// Inspect returns the Inspect type containing the raw *opensearch.Reponse
// Inspect returns the Inspect type containing the raw *opensearch.Response
func (r ClusterPutSettingsResp) Inspect() Inspect {
return Inspect{Response: r.response}
}
2 changes: 1 addition & 1 deletion opensearchapi/api_cluster-state.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ type ClusterStateResp struct {
} `json:"restore"`
}

// Inspect returns the Inspect type containing the raw *opensearch.Reponse
// Inspect returns the Inspect type containing the raw *opensearch.Response
func (r ClusterStateResp) Inspect() Inspect {
return Inspect{Response: r.response}
}
Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_cluster-stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ type ClusterStatsResp struct {
response *opensearch.Response
}

// Inspect returns the Inspect type containing the raw *opensearch.Reponse
// Inspect returns the Inspect type containing the raw *opensearch.Response
func (r ClusterStatsResp) Inspect() Inspect {
return Inspect{Response: r.response}
}
Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_component_template-create.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ type ComponentTemplateCreateResp struct {
response *opensearch.Response
}

// Inspect returns the Inspect type containing the raw *opensearch.Reponse
// Inspect returns the Inspect type containing the raw *opensearch.Response
func (r ComponentTemplateCreateResp) Inspect() Inspect {
return Inspect{Response: r.response}
}
2 changes: 1 addition & 1 deletion opensearchapi/api_component_template-delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ type ComponentTemplateDeleteResp struct {
response *opensearch.Response
}

// Inspect returns the Inspect type containing the raw *opensearch.Reponse
// Inspect returns the Inspect type containing the raw *opensearch.Response
func (r ComponentTemplateDeleteResp) Inspect() Inspect {
return Inspect{Response: r.response}
}
Loading
Loading