Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

allow custom marschallers #25

Open
Open

Description

Allow for custom types that are able to marschall themselves.

For example, the following should assume that the type Data in package A has the Size, Marschall and Unmarschall functions and use those to generate code.

struct Person {
 Name string
 Age A.Data //sizeMarschal
}

It might not be practical for every struct to have a .Size method(for whatever reason) so the following should get the bytes and prefix the length itself.

struct Person {
 Name string
 Age A.Data //Marschal
}

EDIT: when only the Marschal type is specifiend dont generate a size Method, or only support the sizeMarschal type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /