@@ -1518,10 +1518,10 @@ func TestValidator_ValidateCustomEntity(t *testing.T) {
15181518
15191519 for _ , tc := range testCases {
15201520 t .Run (tc .name , func (t * testing.T ) {
1521- fieldList := make ([]interface {} , 0 , len (tc .fields ))
1521+ fieldList := make ([]any , 0 , len (tc .fields ))
15221522 for _ , field := range tc .fields {
1523- fieldList = append (fieldList , map [string ]interface {} {
1524- field .Name : map [string ]interface {} {
1523+ fieldList = append (fieldList , map [string ]any {
1524+ field .Name : map [string ]any {
15251525 "type" : string (field .Type ),
15261526 "required" : field .Required ,
15271527 "reference" : field .Reference ,
@@ -1533,7 +1533,7 @@ func TestValidator_ValidateCustomEntity(t *testing.T) {
15331533 AdminAPIServicesProvider : fakeServicesProvider {
15341534 schemaSvc : fakeSchemaSvc {
15351535 entityTypeExist : tc .entityTypeExist ,
1536- schema : map [string ]interface {} {
1536+ schema : map [string ]any {
15371537 "fields" : fieldList ,
15381538 },
15391539 shouldFail : tc .validateSvcFail ,
@@ -1550,7 +1550,7 @@ func TestValidator_ValidateCustomEntity(t *testing.T) {
15501550}
15511551
15521552type fakeSchemaSvc struct {
1553- schema map [string ]interface {}
1553+ schema map [string ]any
15541554 entityTypeExist bool
15551555 shouldFail bool
15561556}
@@ -1564,7 +1564,7 @@ func (s fakeSchemaSvc) Get(_ context.Context, _ string) (kong.Schema, error) {
15641564 return s .schema , nil
15651565}
15661566
1567- func (s fakeSchemaSvc ) Validate (_ context.Context , _ kong.EntityType , _ interface {} ) (bool , string , error ) {
1567+ func (s fakeSchemaSvc ) Validate (_ context.Context , _ kong.EntityType , _ any ) (bool , string , error ) {
15681568 if s .shouldFail {
15691569 return false , "something is wrong in the entity" , nil
15701570 }
0 commit comments