Skip to content

Commit

Permalink
chore: use StringGetter interface instead of StandardStringGetter for…
Browse files Browse the repository at this point in the history
… HexToInt arg (#312)
  • Loading branch information
raj-k-singh committed Apr 9, 2024
1 parent 5953729 commit b7edd90
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

type HexToIntArguments[K any] struct {
Target ottl.StandardStringGetter[K]
Target ottl.StringGetter[K]
}

func NewHexToIntFactory[K any]() ottl.Factory[K] {
Expand All @@ -27,7 +27,7 @@ func createHexToIntFunction[K any](_ ottl.FunctionContext, oArgs ottl.Arguments)
return hexToInt(args.Target)
}

func hexToInt[K any](target ottl.StandardStringGetter[K]) (ottl.ExprFunc[K], error) {
func hexToInt[K any](target ottl.StringGetter[K]) (ottl.ExprFunc[K], error) {

return func(ctx context.Context, tCtx K) (interface{}, error) {
val, err := target.Get(ctx, tCtx)
Expand Down

0 comments on commit b7edd90

Please sign in to comment.