Skip to content

Commit

Permalink
custom validation/parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
hariso committed Dec 3, 2024
1 parent 5377c33 commit e928991
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions destination.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ type DestinationConfig struct {
DestinationConfigParam string `validate:"inclusion=yes|no" default:"yes"`
}

func (s *DestinationConfig) Validate(ctx context.Context) error {

Check failure on line 24 in destination.go

View workflow job for this annotation

GitHub Actions / golangci-lint

unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
// Custom validation or parsing should be implemented here.
return nil
}

func NewDestination() sdk.Destination {
// Create Destination and wrap it in the default middleware.
return sdk.DestinationWithMiddleware(&Destination{})
Expand Down
5 changes: 5 additions & 0 deletions source.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ type SourceConfig struct {
SourceConfigParam string `json:"foo" validate:"required"`
}

func (s *SourceConfig) Validate(ctx context.Context) error {

Check failure on line 25 in source.go

View workflow job for this annotation

GitHub Actions / golangci-lint

unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
// Custom validation or parsing should be implemented here.
return nil
}

func NewSource() sdk.Source {
// Create Source and wrap it in the default middleware.
return sdk.SourceWithMiddleware(&Source{})
Expand Down

0 comments on commit e928991

Please sign in to comment.