Can Go run statements in cmd like Python?

This page summarizes the projects mentioned and recommended in the original post on /r/golang

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • gore

    Yet another Go REPL that works nicely. Featured with line editing, code completion, and more.

  • You mean a REPL. There are several. One of them is https://github.com/x-motemen/gore

  • gosnip

    Run small snippets of Go code from the command line

  • I while ago I wrote a tool called "gosnip" that allows you to run snippets of Go code from the command line (it runs the snippet through goimports to detect what imports are needed, and then compiles and runs it using go run). You can get it here: https://github.com/benhoyt/gosnip

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • igop

    The Go/Go+ Interpreter

  • If it’s REPL goplus had one https://github.com/goplus/igop

  • yaegi

    Yaegi is Another Elegant Go Interpreter

  • I think https://github.com/traefik/yaegi comes as close as using the python interpreter in you CLI, but for Go

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts