Hacker GitHub

← All repos

erning/gorun

View on GitHub ↗ ★ 1,027 Go

gorun is a tool enabling one to put a "bang line" in the source code of a Go program to run it, or to run such a source code file explicitly. It was created in an attempt to make experimenting with Go more appealing to people used to Python and similar languages which operate most visibly with source code.

5 mentions on Hacker News by 5 people: 0 stories, 5 comments · first 2019-02-11 · latest 2025-12-30

Mentions per year 5 mentions · busiest year 2019 (2)
20082026
  1. You can use https://github.com/erning/gorun as a Go script runner. It lets you embed `go.mod` and `go.sum` and have dependencies in Go scripts. This is more verbose than Python's inline script metadata and requires manual management of…
    comment by networked · 2025-12-30 · in Go away Python
  2. …they came out in favor of using it as a programming language first and foremost. Tools like gorun https://github.com/erning/gorun have existing for almost as long as Go has, so if you want to use Go that way, it is easy to do. They…
  3. …for scripting. But as it stands, it's a sad state of affairs because you have to rely on hacks. [0] https://github.com/erning/gorun/
    comment by mkdirp · 2022-03-11 · in Scripting with Go
  4. …gorun [1] you can: #!/usr/bin/env gorun package main func main() { println("Hello world!") } [1] https://github.com/erning/gorun
    comment by atombender · 2019-10-15 · in My Vision of D’s Future
  5. …that sort of criterion. Go compiles fast enough that you can use it with a wrapper "interpreter": https://github.com/erning/gorun So does C: https://github.com/ryanmjacobs/c So does Haskell: https://stackoverflow.com/a/8676377 So does f#,…