frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Go tool that sorts methods by call graph analysis

https://pkg.go.dev/github.com/borovikovd/gomsort
1•dborovikov•3h ago

Comments

dborovikov•3h ago
I got tired of scrolling through poorly organized Go methods, so I built gomsort - a tool that automatically sorts methods within types using call graph analysis.

The Problem: Methods in Go structs are often randomly ordered, making code hard to follow. You end up with public entry points scattered between private helpers.

The Solution: gomsort analyzes your call graphs and sorts methods by: 1. Public methods first 2. Entry points (low call depth) before helpers 3. Shared utilities (high in-degree) at the bottom

Example transformation:

  // Before - random order
  func (s *Server) helper() string { return "help" }
  func (s *Server) Start() error { return s.connect() }
  func (s *Server) connect() error { s.helper(); return nil }
  func (s *Server) Stop() error { return nil }

  // After - logical flow
  func (s *Server) Start() error { return s.connect() }
  func (s *Server) Stop() error { return nil }
  func (s *Server) connect() error { s.helper(); return nil }
  func (s *Server) helper() string { return "help" }
Features: - Works like go fmt - recursive by default - Integrates with golangci-lint - Preserves comments and semantics - Configurable via .msort.json

Install: go install github.com/borovikovd/gomsort@latest

Repo: https://github.com/borovikovd/gomsort

What do you think? Would this help your codebases?

I'm a founder who bootstrapped a sports platform

1•rallyfuel•49s ago•0 comments

Russia lists local apps that will survive its internet blackouts

https://www.reuters.com/technology/russia-lists-local-apps-that-will-survive-its-internet-blackou...
1•giuliomagnifico•1m ago•0 comments

AnyDice

https://anydice.com/
1•ibobev•2m ago•0 comments

OpenAI: Why Language Models Hallucinate [pdf]

https://cdn.openai.com/pdf/d04913be-3f6f-4d2b-b283-ff432ef4aaa5/why-language-models-hallucinate.pdf
2•Anon84•3m ago•0 comments

Zuckerberg Caught in Revealing Hot Mic Moment During White House Dinner

https://www.pcmag.com/news/zuckerberg-caught-in-revealing-hot-mic-moment-during-white-house-dinner
1•atombender•3m ago•0 comments

Stock buybacks are stock swindles

https://pluralistic.net/2025/09/06/computer-says-huh/#invisible-handcuffs
1•FromTheArchives•4m ago•0 comments

Ask HN: GAN'ing Coding GPTs

1•abrax3141•5m ago•0 comments

Tariffs as Siege Engines – The Long War on China

https://themindness.substack.com/p/tariffs-as-siege-engines-the-long
2•hackandthink•7m ago•0 comments

The Making of GoldenEye 007 (N64) – Interview with Rare's Dr. David Doak [video]

https://www.youtube.com/watch?v=GjJMDrVkZ2Y
1•CharlesW•7m ago•0 comments

MCP for DNS

https://github.com/mattcollins/spaceship-mcp
1•skyfantom•8m ago•1 comments

An E-Bike for the Mind

https://joshbrake.substack.com/p/an-e-bike-for-the-mind
1•vinhnx•8m ago•0 comments

The Salesloft-Drift Breach: Analyzing the Biggest SaaS Breach of 2025

https://www.reco.ai/blog/the-salesloft-drift-breach-analyzing-the-biggest-saas-breach-of-2025
1•llmacpu•8m ago•0 comments

I made a crackme that unlocks a free copy of my book

https://blog.ryanmerket.com/crack-the-code-unlock-a-free-book-the-hackers-edge-challenge-e66065d1...
1•ryanmerket•8m ago•1 comments

Zuckerberg on hot mic telling Trump he wasn't sure how much to spend on AI

https://www.engadget.com/zuckerberg-caught-on-hot-mic-telling-trump-i-wasnt-sure-how-much-to-prom...
1•dataflow•11m ago•0 comments

The Importance of Kindness in Engineering

https://ashouri.xyz/post/kindnessinengineering
1•gpi•11m ago•0 comments

Statement on discourse about ActivityPub and AT Protocol

https://github.com/swicg/general/blob/master/statements%2F2025-09-05-activitypub-and-atproto-disc...
1•gpi•13m ago•0 comments

Levallois Technique

https://en.wikipedia.org/wiki/Levallois_technique
1•tusslewake•14m ago•0 comments

Show HN: Pinblocks – Your Chats with Notion-Style Collaborative Blocks

https://pinblocks.io/
1•p2hari•14m ago•0 comments

Ubuntu installs failing for more than 24 hours due to security.ubuntu.com down

https://askubuntu.com/questions/1555546/why-am-i-unable-to-update-ubuntu-right-now-september-5-20...
1•programd•15m ago•1 comments

A Practical Introduction to Parsing

https://jhwlr.io/intro-to-parsing/
1•ibobev•17m ago•0 comments

Show HN: unplugin-transform-import-meta – Transform ImportMeta at build-time

https://github.com/sushichan044/unplugin-transform-import-meta
1•sushichan044•22m ago•0 comments

Streaming Platforms, Filter Bubbles, and Cultural Inequalities

https://sociologicalscience.com/articles-v6-18-467/
1•bediger4000•26m ago•1 comments

Root cause for why Windows 11 is breaking or corrupting SSDs may have been found

https://www.neowin.net/news/root-cause-for-why-windows-11-is-breaking-or-corrupting-ssds-may-have...
3•bundie•28m ago•0 comments

Silicon Valley's most powerful alliance just got stronger

https://www.theverge.com/command-line-newsletter/773260/google-apple-search-deal-money-ai
1•retskrad•29m ago•1 comments

The Oscar Winning Algorithm

https://sangarshanan.com/2025/09/06/perlin-noise/
1•phantomshelby•31m ago•0 comments

Strudel Flow

https://xyflow.com/strudel-flow
2•fcpguru•32m ago•1 comments

Musk's $1T pay package is full of watered-down takes on his own broken promises

https://techcrunch.com/2025/09/06/musks-1t-pay-package-is-full-of-watered-down-versions-of-his-ow...
8•rntn•33m ago•0 comments

Language-Oriented Programming in Racket(2019)

https://www.youtube.com/watch?v=z8Pz4bJV3Tk
17•farhanhubble•36m ago•0 comments

Chemical pollution a threat comparable to climate change, scientists warn

https://www.theguardian.com/environment/2025/aug/06/chemical-pollution-threat-comparable-climate-...
2•PaulHoule•37m ago•0 comments

Exploiting the Impossible: A Vulnerability Apple Deems Unexploitable

https://jhftss.github.io/Exploiting-the-Impossible/
1•walterbell•40m ago•0 comments