Skip to content

Commit 5a3f542

Browse files
committed
make linter happy
1 parent 278ce98 commit 5a3f542

7 files changed

Lines changed: 18 additions & 18 deletions

File tree

pkg/openSearch/openSearchClient/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ func NewIndexFunction(openSearchProjectClient *opensearchapi.Client) *IndexFunct
567567

568568

569569
<a name="IndexFunction.AliasExists"></a>
570-
### func \(\*IndexFunction\) [AliasExists](<https://github.com/greenbone/opensight-golang-libraries/blob/main/pkg/openSearch/openSearchClient/indexFunctions.go#L219>)
570+
### func \(\*IndexFunction\) [AliasExists](<https://github.com/greenbone/opensight-golang-libraries/blob/main/pkg/openSearch/openSearchClient/indexFunctions.go#L238>)
571571

572572
```go
573573
func (i *IndexFunction) AliasExists(aliasName string) (bool, error)
@@ -594,7 +594,7 @@ func (i *IndexFunction) CreateOrPutAlias(aliasName string, indexNames ...string)
594594

595595

596596
<a name="IndexFunction.DeleteAliasFromIndex"></a>
597-
### func \(\*IndexFunction\) [DeleteAliasFromIndex](<https://github.com/greenbone/opensight-golang-libraries/blob/main/pkg/openSearch/openSearchClient/indexFunctions.go#L168>)
597+
### func \(\*IndexFunction\) [DeleteAliasFromIndex](<https://github.com/greenbone/opensight-golang-libraries/blob/main/pkg/openSearch/openSearchClient/indexFunctions.go#L187>)
598598

599599
```go
600600
func (i *IndexFunction) DeleteAliasFromIndex(indexName string, aliasName string) error
@@ -612,7 +612,7 @@ func (i *IndexFunction) DeleteIndex(indexName string) error
612612

613613

614614
<a name="IndexFunction.ForceMerge"></a>
615-
### func \(\*IndexFunction\) [ForceMerge](<https://github.com/greenbone/opensight-golang-libraries/blob/main/pkg/openSearch/openSearchClient/indexFunctions.go#L395>)
615+
### func \(\*IndexFunction\) [ForceMerge](<https://github.com/greenbone/opensight-golang-libraries/blob/main/pkg/openSearch/openSearchClient/indexFunctions.go#L414>)
616616

617617
```go
618618
func (i *IndexFunction) ForceMerge(index string, maximumNumberOfSegments int) error
@@ -621,7 +621,7 @@ func (i *IndexFunction) ForceMerge(index string, maximumNumberOfSegments int) er
621621

622622

623623
<a name="IndexFunction.GetIndexSettings"></a>
624-
### func \(\*IndexFunction\) [GetIndexSettings](<https://github.com/greenbone/opensight-golang-libraries/blob/main/pkg/openSearch/openSearchClient/indexFunctions.go#L342>)
624+
### func \(\*IndexFunction\) [GetIndexSettings](<https://github.com/greenbone/opensight-golang-libraries/blob/main/pkg/openSearch/openSearchClient/indexFunctions.go#L361>)
625625

626626
```go
627627
func (i *IndexFunction) GetIndexSettings(index string) (map[string]interface{}, error)
@@ -639,7 +639,7 @@ func (i *IndexFunction) GetIndexes(pattern string) ([]string, error)
639639

640640

641641
<a name="IndexFunction.GetIndexesForAlias"></a>
642-
### func \(\*IndexFunction\) [GetIndexesForAlias](<https://github.com/greenbone/opensight-golang-libraries/blob/main/pkg/openSearch/openSearchClient/indexFunctions.go#L248>)
642+
### func \(\*IndexFunction\) [GetIndexesForAlias](<https://github.com/greenbone/opensight-golang-libraries/blob/main/pkg/openSearch/openSearchClient/indexFunctions.go#L267>)
643643

644644
```go
645645
func (i *IndexFunction) GetIndexesForAlias(aliasName string) ([]string, error)
@@ -657,7 +657,7 @@ func (i *IndexFunction) IndexExists(indexName string) (bool, error)
657657

658658

659659
<a name="IndexFunction.IndexHasAlias"></a>
660-
### func \(\*IndexFunction\) [IndexHasAlias](<https://github.com/greenbone/opensight-golang-libraries/blob/main/pkg/openSearch/openSearchClient/indexFunctions.go#L194>)
660+
### func \(\*IndexFunction\) [IndexHasAlias](<https://github.com/greenbone/opensight-golang-libraries/blob/main/pkg/openSearch/openSearchClient/indexFunctions.go#L213>)
661661

662662
```go
663663
func (i *IndexFunction) IndexHasAlias(indexNames []string, aliasNames []string) (bool, error)
@@ -666,7 +666,7 @@ func (i *IndexFunction) IndexHasAlias(indexNames []string, aliasNames []string)
666666

667667

668668
<a name="IndexFunction.RefreshIndex"></a>
669-
### func \(\*IndexFunction\) [RefreshIndex](<https://github.com/greenbone/opensight-golang-libraries/blob/main/pkg/openSearch/openSearchClient/indexFunctions.go#L318>)
669+
### func \(\*IndexFunction\) [RefreshIndex](<https://github.com/greenbone/opensight-golang-libraries/blob/main/pkg/openSearch/openSearchClient/indexFunctions.go#L337>)
670670

671671
```go
672672
func (i *IndexFunction) RefreshIndex(index string) error
@@ -675,7 +675,7 @@ func (i *IndexFunction) RefreshIndex(index string) error
675675

676676

677677
<a name="IndexFunction.RemoveIndexesFromAlias"></a>
678-
### func \(\*IndexFunction\) [RemoveIndexesFromAlias](<https://github.com/greenbone/opensight-golang-libraries/blob/main/pkg/openSearch/openSearchClient/indexFunctions.go#L267>)
678+
### func \(\*IndexFunction\) [RemoveIndexesFromAlias](<https://github.com/greenbone/opensight-golang-libraries/blob/main/pkg/openSearch/openSearchClient/indexFunctions.go#L286>)
679679

680680
```go
681681
func (i *IndexFunction) RemoveIndexesFromAlias(indexesToRemove []string, aliasName string) error
@@ -684,7 +684,7 @@ func (i *IndexFunction) RemoveIndexesFromAlias(indexesToRemove []string, aliasNa
684684

685685

686686
<a name="IndexFunction.SetIndexSettings"></a>
687-
### func \(\*IndexFunction\) [SetIndexSettings](<https://github.com/greenbone/opensight-golang-libraries/blob/main/pkg/openSearch/openSearchClient/indexFunctions.go#L370>)
687+
### func \(\*IndexFunction\) [SetIndexSettings](<https://github.com/greenbone/opensight-golang-libraries/blob/main/pkg/openSearch/openSearchClient/indexFunctions.go#L389>)
688688

689689
```go
690690
func (i *IndexFunction) SetIndexSettings(index string, settingsBody io.Reader) error

pkg/openSearch/openSearchClient/opensearchProjectClient.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func NewOpenSearchProjectClient(ctx context.Context, config config.OpensearchCli
3636
Client: opensearch.Config{
3737
Transport: &http.Transport{
3838
TLSClientConfig: &tls.Config{
39-
InsecureSkipVerify: true, // nolint:gosec
39+
InsecureSkipVerify: true, //nolint:gosec
4040
},
4141
},
4242
Addresses: []string{

pkg/openSearch/openSearchQuery/boolQueryBuilder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ func createMappedField(dtoField filter.RequestField, fieldMapping map[string]str
224224
entityName, ok := fieldMapping[dtoField.Name]
225225
if !ok {
226226
return filter.RequestField{}, filter.NewInvalidFilterFieldError(
227-
"Mapping for filter field '%s' is currently not implemented.", dtoField.Name)
227+
"mapping for filter field '%s' is currently not implemented", dtoField.Name)
228228
}
229229

230230
return filter.RequestField{

pkg/openSearch/osquery/boolQueryBuilder.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func (q *BoolQueryBuilder) AddTermsFilter(fieldName string, values ...any) error
7171

7272
entityName, ok := q.querySettings.FilterFieldMapping[fieldName]
7373
if !ok {
74-
return fmt.Errorf("Mapping for filter field '%s' is currently not implemented.", fieldName)
74+
return fmt.Errorf("mapping for filter field '%s' is currently not implemented", fieldName)
7575
}
7676

7777
q.query = q.query.Filter(esquery.Terms(entityName, values...))
@@ -84,7 +84,7 @@ func (q *BoolQueryBuilder) AddTermsFilter(fieldName string, values ...any) error
8484
func (q *BoolQueryBuilder) AddTermFilter(fieldName string, value any) error {
8585
entityName, ok := q.querySettings.FilterFieldMapping[fieldName]
8686
if !ok {
87-
return fmt.Errorf("Mapping for filter field '%s' is currently not implemented.", fieldName)
87+
return fmt.Errorf("mapping for filter field '%s' is currently not implemented", fieldName)
8888
}
8989

9090
q.query = q.query.Filter(esquery.Term(entityName, value))
@@ -229,7 +229,7 @@ func createMappedField(dtoField filter.RequestField, fieldMapping map[string]str
229229
entityName, ok := fieldMapping[dtoField.Name]
230230
if !ok {
231231
return filter.RequestField{}, filter.NewInvalidFilterFieldError(
232-
"Mapping for filter field '%s' is currently not implemented.", dtoField.Name)
232+
"mapping for filter field '%s' is currently not implemented", dtoField.Name)
233233
}
234234

235235
return filter.RequestField{

pkg/openSearch/ostesting/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ NewIndexAlias creates new uniquely named index together with associated alias us
203203

204204
Internally opensearchapi.Client is called directly rather than opensearch.Client, to avoid using tested object in testing setup and to not have to adjust opensearch.Client methods just for the sake of being used by Tester \(as tester use\-case of generating unique index/alias with custom mapping differs from production use\-cases\).
205205

206-
Upon succesful creation the function returns index and associated alias names, in case of error \[t\] is used to mark test as failed. Note: usually the index should be accessed through alias name. In some cases the method needs to receive the concrete index instead.
206+
Upon successful creation the function returns index and associated alias names, in case of error \[t\] is used to mark test as failed. Note: usually the index should be accessed through alias name. In some cases the method needs to receive the concrete index instead.
207207

208208
<a name="Tester.NewNamedIndexAlias"></a>
209209
### func \(Tester\) [NewNamedIndexAlias](<https://github.com/greenbone/opensight-golang-libraries/blob/main/pkg/openSearch/ostesting/tester.go#L235>)

pkg/openSearch/ostesting/tester.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ func NewTester(t *testing.T, opts ...TesterOption) *Tester {
104104
osClient, err := opensearchapi.NewClient(opensearchapi.Config{
105105
Client: opensearch.Config{
106106
Transport: &http.Transport{
107-
TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, // not for production use
107+
TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, //nolint:gosec // not for production use
108108
},
109109
Addresses: []string{tst.conf.Address},
110110
Username: tst.conf.User,
@@ -205,7 +205,7 @@ func (tst Tester) NewTestTypeIndex(t *testing.T, prefix string) string {
205205
// the sake of being used by Tester (as tester use-case of generating unique index/alias with
206206
// custom mapping differs from production use-cases).
207207
//
208-
// Upon succesful creation the function returns index and associated alias names, in case of error [t] is used to mark test
208+
// Upon successful creation the function returns index and associated alias names, in case of error [t] is used to mark test
209209
// as failed.
210210
// Note: usually the index should be accessed through alias name. In some cases the method needs
211211
// to receive the concrete index instead.

pkg/postgres/query/compose.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func composeQuery(
2626
field.Name = dbColumnName
2727
} else {
2828
return "", filter.NewInvalidFilterFieldError(
29-
"Mapping for filter field '%s' is currently not implemented.", field.Name)
29+
"mapping for filter field '%s' is currently not implemented", field.Name)
3030
}
3131

3232
switch field.Operator {

0 commit comments

Comments
 (0)