@@ -99,11 +99,11 @@ func basicSliceFloat() (ExprFunc[any], error) {
99
99
}, nil
100
100
}
101
101
102
- func basicSliceBytes () (ExprFunc [any ], error ) {
102
+ func basicSliceByte () (ExprFunc [any ], error ) {
103
103
return func (_ context.Context , _ any ) (any , error ) {
104
104
return []any {
105
- [][] byte {
106
- [] byte ("pass" ),
105
+ []byte {
106
+ byte ('p' ),
107
107
},
108
108
}, nil
109
109
}, nil
@@ -314,7 +314,6 @@ func Test_newGetter(t *testing.T) {
314
314
Function : "SliceBool" ,
315
315
Keys : []key {
316
316
{
317
- // note for review: not sure if this is correct
318
317
Int : ottltest .Intp (0 ),
319
318
},
320
319
{
@@ -334,7 +333,6 @@ func Test_newGetter(t *testing.T) {
334
333
Function : "SliceInteger" ,
335
334
Keys : []key {
336
335
{
337
- // note for review: not sure if this is correct
338
336
Int : ottltest .Intp (0 ),
339
337
},
340
338
{
@@ -354,7 +352,6 @@ func Test_newGetter(t *testing.T) {
354
352
Function : "SliceFloat" ,
355
353
Keys : []key {
356
354
{
357
- // note for review: not sure if this is correct
358
355
Int : ottltest .Intp (0 ),
359
356
},
360
357
{
@@ -367,14 +364,13 @@ func Test_newGetter(t *testing.T) {
367
364
want : 1.0 ,
368
365
},
369
366
{
370
- name : "function call nested SliceBytes " ,
367
+ name : "function call nested SliceByte " ,
371
368
val : value {
372
369
Literal : & mathExprLiteral {
373
370
Converter : & converter {
374
- Function : "SliceBytes " ,
371
+ Function : "SliceByte " ,
375
372
Keys : []key {
376
373
{
377
- // note for review: not sure if this is correct
378
374
Int : ottltest .Intp (0 ),
379
375
},
380
376
{
@@ -384,7 +380,7 @@ func Test_newGetter(t *testing.T) {
384
380
},
385
381
},
386
382
},
387
- want : [] byte ("pass" ),
383
+ want : byte ('p' ),
388
384
},
389
385
{
390
386
name : "enum" ,
@@ -685,7 +681,7 @@ func Test_newGetter(t *testing.T) {
685
681
createFactory ("SliceBool" , & struct {}{}, basicSliceBool ),
686
682
createFactory ("SliceInteger" , & struct {}{}, basicSliceInteger ),
687
683
createFactory ("SliceFloat" , & struct {}{}, basicSliceFloat ),
688
- createFactory ("SliceBytes " , & struct {}{}, basicSliceBytes ),
684
+ createFactory ("SliceByte " , & struct {}{}, basicSliceByte ),
689
685
)
690
686
691
687
p , _ := NewParser [any ](
0 commit comments