# Write Go code in JavaScript files

> This Vite plugin allows developers to write Go code directly within JavaScript files using a "use golang" directive, automatically compiling it to WebAssembly.

Page: https://nowfound.app/launch/write-go-code-in-javascript-files

- Launched: 2025-10-27
- Launch-day votes: 158, 47 comments; #184 of 8,210 launches that month (top 2%)
- Website: [npmjs.com](https://www.npmjs.com/package/vite-plugin-use-golang), not reachable when checked 2026-12-01
- Category: [Dev tools](https://nowfound.app/c/developer-tools.md)
- Forecast: 96% chance its website is still online in November 2031 (99% in November 2027, 97% in November 2029). Made 2026-11-29 and not revised. Typical launch of 2025: 85%. [Method](https://nowfound.app/forecast.md)
- Originality: 51/100 (familiar idea). More original than 51% of products launched in 2025. On its launch day the archive already held 25 similar products; none have launched since.

## In plain words

This Vite plugin allows developers to write Go code directly within JavaScript files using a "use golang" directive, automatically compiling it to WebAssembly. It integrates into the Vite build process to streamline the workflow of mixing Go and JavaScript in web projects. The tool is designed for developers who want to leverage Go's performance capabilities while working within a JavaScript-based development environment.

_Written by AI from its launch page and website, 2026-09-05._

## Does a similar job

- [Code To Go](https://nowfound.app/launch/code-to-go): Find updated snippets for common JavaScript use cases (2017-12-15, 437 votes, forecast: 87% online in 2031, codetogo.io)
- [Wrote a tiny WebAssembly (wat2wasm) compiler in](https://nowfound.app/launch/wrote-a-tiny-webassembly-wat2wasm-compiler-in-go): This is a minimal WebAssembly compiler written in Go that converts WebAssembly text format (WAT) to binary format (WASM). (2022-11-01, 75 votes, free, forecast: 90% online in 2031, github.com)
- [Vite](https://nowfound.app/launch/vite-st412727): Next generation frontend tooling (2023-09-03, 671 votes, free, forecast: 85% online in 2031, vite.dev)
- [Go Template Preview](https://nowfound.app/launch/go-template-preview-powered-by-webassembly): Quickly test and visualize your Go templates live. Template and data never leave your browser unless you share. (2022-06-12, 102 votes, forecast: 93% online in 2031, gotemplate.io)
- [Wasmer](https://nowfound.app/launch/wasmer-a-go-library-for-executing-webassembly-binaries): 🐹🕸️ WebAssembly runtime for Go. (2019-05-30, 44 votes, free, forecast: 94% online in 2031, github.com)
- [Execute JavaScript in a WebAssembly QuickJS](https://nowfound.app/launch/execute-javascript-in-a-webassembly-quickjs-sandbox): This TypeScript package allows you to safely execute JavaScript code within a WebAssembly sandbox using the QuickJS engine. Perfect for isolating and running untrusted code securely, it leverages the… (2024-07-07, 206 votes, free, forecast: 96% online in 2031, github.com)

All alternatives: https://nowfound.app/alternatives/write-go-code-in-javascript-files.md

## For the maker of Write Go code in JavaScript files

- Feature it at the top of the NowFound home page for $19 for 30 days, marked sponsored: https://nowfound.app/feature/write-go-code-in-javascript-files
- Free: put the badge on the product's own site and it joins Featured products after the paid spots, and this page links to the site with a normal link search engines follow. HTML for the footer: `<a href="https://nowfound.app/launch/write-go-code-in-javascript-files"><img src="https://nowfound.app/badge/write-go-code-in-javascript-files.svg" alt="Write Go code in JavaScript files on NowFound" height="32"></a>`

Source: [Show HN post](https://news.ycombinator.com/item?id=45717724)
