Skip to content

Conversation

@miladev95
Copy link

Introduce a typed Platform enum with helpers and codecs while preserving legacy constants for compatibility. Add a typed LogBlock with validation.

Changes

  • Add Platform (PlatformIOS, PlatformAndroid, PlatformHuawei) with String(), IsValid(), ParsePlatform(string).
  • Add MarshalText/UnmarshalText and MarshalJSON/UnmarshalJSON for Platform (supports legacy numeric 1/2/3).
  • Add LogBlock with LogSucceededPush, LogFailedPush and IsValid().
  • Keep legacy constants PlatFormIos, PlatFormAndroid, PlatFormHuawei, SucceededPush, FailedPush.
  • Add focused tests in core/core_test.go.

Backward compatibility

  • Existing code using legacy constants continues to work. New typed APIs are opt‑in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant