Skip to content

Commit

Permalink
chore: generated code for commit 7c5e692. [skip ci]
Browse files Browse the repository at this point in the history
Co-authored-by: Thomas Raffray <Fluf22@users.noreply.github.com>
  • Loading branch information
algolia-bot and Fluf22 committed Jan 26, 2024
1 parent 7c5e692 commit 73b88d4
Show file tree
Hide file tree
Showing 149 changed files with 17,113 additions and 2,731 deletions.
4 changes: 2 additions & 2 deletions clients/algoliasearch-client-go/algolia/abtesting/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,14 +258,14 @@ func reportError(format string, a ...any) error {
}

// A wrapper for strict JSON decoding.
func newStrictDecoder(data []byte) *json.Decoder {
func newStrictDecoder(data []byte) *json.Decoder {
dec := json.NewDecoder(bytes.NewBuffer(data))
dec.DisallowUnknownFields()
return dec
}

// A wrapper for validating a struct, returns nil if value is not a struct.
func validateStruct(v any) error {
func validateStruct(v any) error {
err := validator.New().Struct(v)
validationErrors, ok := err.(validator.ValidationErrors)
if ok && len(validationErrors) > 0 {
Expand Down
4 changes: 2 additions & 2 deletions clients/algoliasearch-client-go/algolia/analytics/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,14 +258,14 @@ func reportError(format string, a ...any) error {
}

// A wrapper for strict JSON decoding.
func newStrictDecoder(data []byte) *json.Decoder {
func newStrictDecoder(data []byte) *json.Decoder {
dec := json.NewDecoder(bytes.NewBuffer(data))
dec.DisallowUnknownFields()
return dec
}

// A wrapper for validating a struct, returns nil if value is not a struct.
func validateStruct(v any) error {
func validateStruct(v any) error {
err := validator.New().Struct(v)
validationErrors, ok := err.(validator.ValidationErrors)
if ok && len(validationErrors) > 0 {
Expand Down
4 changes: 2 additions & 2 deletions clients/algoliasearch-client-go/algolia/ingestion/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,14 +254,14 @@ func reportError(format string, a ...any) error {
}

// A wrapper for strict JSON decoding.
func newStrictDecoder(data []byte) *json.Decoder {
func newStrictDecoder(data []byte) *json.Decoder {
dec := json.NewDecoder(bytes.NewBuffer(data))
dec.DisallowUnknownFields()
return dec
}

// A wrapper for validating a struct, returns nil if value is not a struct.
func validateStruct(v any) error {
func validateStruct(v any) error {
err := validator.New().Struct(v)
validationErrors, ok := err.(validator.ValidationErrors)
if ok && len(validationErrors) > 0 {
Expand Down
4 changes: 2 additions & 2 deletions clients/algoliasearch-client-go/algolia/insights/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,14 +258,14 @@ func reportError(format string, a ...any) error {
}

// A wrapper for strict JSON decoding.
func newStrictDecoder(data []byte) *json.Decoder {
func newStrictDecoder(data []byte) *json.Decoder {
dec := json.NewDecoder(bytes.NewBuffer(data))
dec.DisallowUnknownFields()
return dec
}

// A wrapper for validating a struct, returns nil if value is not a struct.
func validateStruct(v any) error {
func validateStruct(v any) error {
err := validator.New().Struct(v)
validationErrors, ok := err.(validator.ValidationErrors)
if ok && len(validationErrors) > 0 {
Expand Down
4 changes: 2 additions & 2 deletions clients/algoliasearch-client-go/algolia/recommend/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,14 +260,14 @@ func reportError(format string, a ...any) error {
}

// A wrapper for strict JSON decoding.
func newStrictDecoder(data []byte) *json.Decoder {
func newStrictDecoder(data []byte) *json.Decoder {
dec := json.NewDecoder(bytes.NewBuffer(data))
dec.DisallowUnknownFields()
return dec
}

// A wrapper for validating a struct, returns nil if value is not a struct.
func validateStruct(v any) error {
func validateStruct(v any) error {
err := validator.New().Struct(v)
validationErrors, ok := err.(validator.ValidationErrors)
if ok && len(validationErrors) > 0 {
Expand Down
4 changes: 2 additions & 2 deletions clients/algoliasearch-client-go/algolia/search/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,14 +260,14 @@ func reportError(format string, a ...any) error {
}

// A wrapper for strict JSON decoding.
func newStrictDecoder(data []byte) *json.Decoder {
func newStrictDecoder(data []byte) *json.Decoder {
dec := json.NewDecoder(bytes.NewBuffer(data))
dec.DisallowUnknownFields()
return dec
}

// A wrapper for validating a struct, returns nil if value is not a struct.
func validateStruct(v any) error {
func validateStruct(v any) error {
err := validator.New().Struct(v)
validationErrors, ok := err.(validator.ValidationErrors)
if ok && len(validationErrors) > 0 {
Expand Down
Loading

0 comments on commit 73b88d4

Please # to comment.