Repository navigation
v0.0.13
-
Replace all interface{} with any in protocol/operation.go and protocol/operations.go
-
Fix MarshalJSON to use op directly instead of op.Data() type assertion
-
Align with Go 1.18+ modern code style
-
Add comprehensive documentation for Operation.Data() method
-
Include return type explanations (known vs unknown operations)
-
Provide 5 best practice examples:
- Type assertion based on operation type
- Safe type assertion with error handling
- Handling unknown operations
- Direct operation access
- Iterating over operations
-
Add important notes about type safety and performance
-
Use modern Go style (any instead of interface{})