Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestSerializer (0.15 sec)

  1. tests/serializer_test.go

    }
    
    func (c *CustomSerializer) Value(ctx context.Context, field *schema.Field, dst reflect.Value, fieldValue interface{}) (interface{}, error) {
    	return fmt.Sprintf("%s%s", c.prefix, fieldValue), nil
    }
    
    func TestSerializer(t *testing.T) {
    	schema.RegisterSerializer("custom", NewCustomSerializer("hello"))
    	DB.Migrator().DropTable(adaptorSerializerModel(&SerializerStruct{}))
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Fri Apr 21 14:09:38 UTC 2023
    - 7.6K bytes
    - Viewed (0)
Back to top