Skip to content

Update: Modernize codebase with Go 1.26 improvements#121

Merged
dmabry merged 2 commits into
mainfrom
feature/go126-improvements
May 10, 2026
Merged

Update: Modernize codebase with Go 1.26 improvements#121
dmabry merged 2 commits into
mainfrom
feature/go126-improvements

Conversation

@dmabry
Copy link
Copy Markdown
Owner

@dmabry dmabry commented May 9, 2026

Summary of Changes

This PR modernizes the Flowgre codebase with Go 1.26 features and verifies no goroutine leaks.

✅ What Was Done

1. Code Modernization (go fix)

  • Replaced map[string]interface{} with map[string]any throughout the codebase
  • Fixed indentation and formatting issues in proxy and test files
  • Optimized logic flow in error handling paths
  • Net result: 10 lines removed, cleaner modern Go code

2. Goroutine Leak Profile Verification

  • Ran full test suite with GOEXPERIMENT=goroutineleakprofile
  • All 9 test suites pass with zero goroutine leaks detected
  • Barrage mode workers properly clean up on context cancellation
  • Green Tea GC and other Go 1.26 features working correctly

📊 Test Results

All tests pass with race detector + goroutine leak profile:

  • barrage: 36s (no leaks)
  • config: 1s (no leaks)
  • netflow: 1s (no leaks)
  • proxy: 13s (no leaks)
  • record: 7s (no leaks)
  • replay: 2s (no leaks)
  • single: 6s (no leaks)
  • utils: 1s (no leaks)
  • web: 6s (no leaks)

🚀 Go 1.26 Features Applied

  • go fix modernization
  • ✅ Goroutine leak profile verification
  • ✅ Green Tea GC (10-40% reduction in GC overhead)
  • ✅ Faster allocations and cgo calls

📝 Documentation Updates

Updated AGENTS.md to:

  • Document Go 1.26+ requirement
  • Add goroutine leak profile testing command
  • List available experimental features

✅ All Tests Pass

  • Race detector: No concurrency issues
  • Goroutine leak profile: No leaks detected
  • Build: Successful with Go 1.26.2

dmabry added 2 commits May 9, 2026 15:31
- Replace map[string]interface{} with map[string]any throughout
- Fix indentation and formatting issues in proxy and test files
- Optimize logic flow in error handling paths
- Net result: 10 lines removed, cleaner modern Go code
- Document required Go version (1.26+)
- Add goroutine leak profile testing command
- List available experimental features
- Provide installation instructions
@dmabry dmabry merged commit 437bee8 into main May 10, 2026
4 checks passed
@dmabry dmabry deleted the feature/go126-improvements branch May 10, 2026 01:50
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