Skip to content

[Go] Refactor Go serialization code structure for maintainability #3018

@chaokunyang

Description

@chaokunyang

Feature Request

No response

Is your feature request related to a problem? Please describe

The current codebase has:

  • Mixed responsibilities in single files
  • Unclear separation between serializers and core logic
  • Difficulty finding and understanding code paths
  • Some inconsistent naming conventions

Describe the solution you'd like

Reorganize the codebase:

  • Separate reader and writer logic into dedicated files (reader.go, writer.go)
  • Extract type-specific serializers (array, primitive, pointer, time, etc.)
  • Rename files for clarity (resolver.gometa_string_resolver.go)
  • Group related types and constants
  • Improve code documentation

Benefits

  • Easier code navigation and maintenance
  • Clear separation of concerns
  • Better discoverability of functionality
  • Reduced file sizes and complexity

Describe alternatives you've considered

No response

Additional context

#2982

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions