Original post

Hi When I try to open an exe file In Golang it closes directly. I’m using geany as an editor and I’m quite the beginner, I can do the basics in Go but idk how to make an executable file working.

This is my current code:

package main

import ( „fmt“ „math/rand“ „time“ )

func main (){ rand.Seed(time.Now().Unix()) prompts:=[]string{„hello“, „how are u“, „what ure doing?“}

fmt.Println(„choosen was: “, prompts[rand.Intn(len(prompts))])