Avatar ·

Does Go provide a built-in REPL for debugging and testing code?

Hi! I'm new to Go (migrating from Python) and I'm used to quickly testing small code snippets in an interactive shell (REPL). In Python, I can just type `python` in the terminal and immediately execute expressions, for example: ```python >>> a = [1, 2, 3] >>> sum(a) 6 ``` In Go, I tried running `go` in the console, but only got a list of commands. I also tried writing a simple one-line program, but Go requires a full structure with `package main` and `func main()`. For example, to test a slice, I have to create a `test.go` file: ```go package main import "fmt" func main() { nums := []int{1, 2, 3} fmt.Println(nums[1:]) } ``` Then compile and run it with `go run test.go`. This takes time, especially when I need to quickly check the behavior of