Skip to content

Instantly share code, notes, and snippets.

View unknwon's full-sized avatar
๐Ÿš
่Šฑๆœ‰้‡ๅผ€ๆ—ฅ๏ผŒไบบๆ— ๅ†ๅฐ‘ๅนด

แดŠแดแด‡ แด„สœแด‡ษด unknwon

๐Ÿš
่Šฑๆœ‰้‡ๅผ€ๆ—ฅ๏ผŒไบบๆ— ๅ†ๅฐ‘ๅนด
View GitHub Profile
@posener
posener / go-shebang-story.md
Last active April 23, 2026 00:03
Story: Writing Scripts with Go

Story: Writing Scripts with Go

This is a story about how I tried to use Go for scripting. In this story, Iโ€™ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion Iโ€™ll deep dive to scripts, shells, and shebangs. Finally, weโ€™ll discuss solutions that will make Go scripts work.

Why Go is good for scripting?

While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.