There is no helper function in the standard library for this.
You have to create your own, or use an existing one like gopass (supports windows, unix, bsd).
Using gopass: (example taken from their website)
import "fmt"
import "github.com/howeyc/gopass"
func main() {
fmt.Printf("Password: ")
pass := gopass.GetPasswd() // Silent, for *'s use gopass.GetPasswdMasked()
// Do something with pass
}