Enhancing Golang with Custom Software Development: My Plugin for Short Function Literals
As a Go developer, I’ve always appreciated the simplicity and efficiency of the language, particularly when it comes to custom software development. However, one ongoing challenge stands out: the verbosity of function literals. I recently proposed a solution to an issue that has been discussed in the Go community for eight years and has amassed over 800 comments. I created a plugin that introduces a concise syntax for function literals while maintaining compatibility.
Read on to find out how I built it and how it improves my development workflow.
The ongoing discussion on short function literals in Go
If you've followed discussions within the Go GitHub community, you'll be aware that the introduction of short function literals is one of the most debated topics.
This proposal has been open for over eight years and has received hundreds of contributions and almost a thousand comments. Many Go developers want a simpler way to define functions without compromising the language’s core principles.
The primary issue lies in Go’s syntax. Currently, whenever a function is treated as a variable, its entire type must be declared — a practice that quickly becomes verbose and difficult to read, particularly with complex functions. Many of us look to languages such as Scala, Rust, or JavaScript for inspiration, wondering whether Go might benefit from arrow functions or more concise notation.

My solution: A plugin that virtually simplifies Go code
Rather than wait for an official language change, I developed a plugin that provides a visual transformation of Go code directly in the editor.
Key features:
- Real-time suggestions: The plugin displays simplified versions of verbose function literals as I work, either automatically or on demand.
- Non-intrusive: The original Go source code remains untouched — the transformation is purely visual and editor-specific.
- Team-friendly: Since the standard syntax remains in the codebase, the plugin is fully compatible with the Go compiler and teammates who don't use the plugin.

Simplifying real-world code: How the plugin works
From experience, I’ve found that only basic, single-line function literals are truly convenient in Go. Anything more complex, such as those involving loops or multiple parameters, quickly becomes tedious to format and read.
My plugin can trigger a transformation that makes these verbose literals appear cleaner and more concise by clicking the 'Short functions' button, improving code readability and streamlining my development workflow.

Supporting multiple syntax styles: Go-inspired and arrow functions
Flexibility was a top priority when designing this tool. By default, the plugin uses a Go-inspired short syntax. But for developers who prefer modern alternatives, there's also an option to display function literals in a JavaScript-style arrow function format — this is purely a visual transformation within the editor.
Although Go does not natively support arrow syntax, this feature enables developers to work in a familiar style that improves readability for those coming from other languages. The choice of display style is entirely up to you, with no changes to the underlying code.
No breaking changes — just improved readability
A core principle behind this plugin is non-intrusiveness. It only affects how code appears in the editor — the actual source remains untouched.
- The Go compiler still recognises the original, standard syntax.
- Your team can continue to work with the same idiomatic Go code.
- No additional setup or reconfiguration is required.
This makes it a safe, practical solution for individual developers and teams alike, especially in professional environments where compatibility and code stability are essential.
Merging simplicity and flexibility in Golang
The journey from tracking GitHub conversations to building this plugin represents a broader trend in the Go ecosystem: a growing desire for cleaner, more expressive code without compromising on performance or simplicity.
Although official changes to Go's syntax are still years away, this plugin offers a practical, forward-thinking solution. It helps bridge the gap between modern development practices and Go’s minimalist philosophy right inside the editor.
What has been your experience?
Are you a Go developer who is frustrated by verbose function syntax? Whether you prefer arrow functions or the classic Go style, this plugin could transform your development experience.
Have you tried similar tools? What are your thoughts on short function literals in Go? Let's continue the conversation and keep pushing Go forward together.