• Tim Hockin's avatar
    Make patch-up conversions simpler · fd91d3f0
    Tim Hockin authored
    Rather than an "all or nothing" approach to defining a custom conversion
    function (which seems destined to cause problems eventually), this is an
    attempt to make it possible to call the auto-generated code and then "fix it
    up".
    
    Specifically, consider you have a fooBar struct.  If you don't define a
    conversion for FooBar, you will get a generated function like:
        convert_v1_FooBar_To_api_FooBar()
    
    Before this PR, if you define your own conversion function, you get no
    generated function.  After this PR you get:
        autoconvert_v1_FooBar_To_api_FooBar()
    ...which you can call yourself in your custom function.
    fd91d3f0
conversion_generator.go 26.8 KB