FAQ
Hello,

I have this piece :

~~~

package main

import "fmt"

func main() {
     var x string = "Hello World"
     fmt.Println(x)
}

~~~

but when I do go run main,go I see this error :
main.go:1:1: expected 'package', found 'EOF'
which surprise me because line 1 starts with a package


Roelof

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Nico at Jan 23, 2015 at 2:16 pm
    Did you save before calling GoRun?

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Roelof Wobben at Jan 23, 2015 at 2:36 pm
    I thought I did but I saved it one more time and now it works.

    Thanks, now I can work on the golang book to learn go.

    Roelof


    Op vrijdag 23 januari 2015 15:16:15 UTC+1 schreef Nico:
    Did you save before calling GoRun?
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedJan 23, '15 at 2:04p
activeJan 23, '15 at 2:36p
posts3
users2
websitegolang.org

2 users in discussion

Roelof Wobben: 2 posts Nico: 1 post

People

Translate

site design / logo © 2022 Grokbase