FAQ
When I run the following code with the command "go.exe run main.go", the
program doesnt print text to the screen or exit.

     package main

     import "fmt"

     func main(){
         fmt.Println("Hello world")
     }

Line feeds

     package mainLF
     LF
     import "fmt"LF
     LF
     func main(){LF
         fmt.Println("Hello world")LF
     }LF

The following doesn't print to the command prompt either.

     package main

     //import "fmt"

     func main(){
         println("Hello world")
     }

The following gives the error "fmt imported but not used" so it must be
doing something.

     package main

     import "fmt"

     func main(){

     }

GOROOT is set to C:\Go\

PATH: C:\Go\bin

Version windows/386 on Windows 10

Filepath: c:\project

CMD: go run c:\project\main.go


set GOARCH=386
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=386
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Go\bin
set GORACE=
set GOROOT=C:\Go
set GOTOOLDIR=C:\Go\pkg\tool\windows_386
set GO15VENDOREXPERIMENT=
set CC=gcc
set GOGCCFLAGS=-m32 -mthreads -fmessage-length=0
set CXX=g++
set CGO_ENABLED=1

--
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

  • Arie van Wingerden at Nov 15, 2015 at 4:29 pm
    Your GOPATH is wrong. Read the docs: https://golang.org/doc/install

    2015-11-15 16:45 GMT+01:00 <mbudge1@gmail.com>:
    When I run the following code with the command "go.exe run main.go", the
    program doesnt print text to the screen or exit.

    package main

    import "fmt"

    func main(){
    fmt.Println("Hello world")
    }

    Line feeds

    package mainLF
    LF
    import "fmt"LF
    LF
    func main(){LF
    fmt.Println("Hello world")LF
    }LF

    The following doesn't print to the command prompt either.

    package main

    //import "fmt"

    func main(){
    println("Hello world")
    }

    The following gives the error "fmt imported but not used" so it must be
    doing something.

    package main

    import "fmt"

    func main(){

    }

    GOROOT is set to C:\Go\

    PATH: C:\Go\bin

    Version windows/386 on Windows 10

    Filepath: c:\project

    CMD: go run c:\project\main.go


    set GOARCH=386
    set GOBIN=
    set GOEXE=.exe
    set GOHOSTARCH=386
    set GOHOSTOS=windows
    set GOOS=windows
    set GOPATH=C:\Go\bin
    set GORACE=
    set GOROOT=C:\Go
    set GOTOOLDIR=C:\Go\pkg\tool\windows_386
    set GO15VENDOREXPERIMENT=
    set CC=gcc
    set GOGCCFLAGS=-m32 -mthreads -fmessage-length=0
    set CXX=g++
    set CGO_ENABLED=1

    --
    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.
    --
    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.
  • Mbudge1 at Nov 16, 2015 at 9:44 am
    Hi,

    I've attached an image showing what's happening. It still hangs.

    Thanks

    --
    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.
  • Mbudge1 at Nov 16, 2015 at 9:45 am
    Updated gopath and it still doesn't work.

    set GOARCH=386
    set GOBIN=
    set GOEXE=.exe
    set GOHOSTARCH=386
    set GOHOSTOS=windows
    set GOOS=windows
    set GOPATH=C:\project
    set GORACE=
    set GOROOT=C:\Go
    set GOTOOLDIR=C:\Go\pkg\tool\windows_386
    set GO15VENDOREXPERIMENT=
    set CC=gcc
    set GOGCCFLAGS=-m32 -mthreads -fmessage-length=0
    set CXX=g++
    set CGO_ENABLED=1

    --
    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.
  • Dippo6905 at Nov 16, 2015 at 1:38 pm
    Can you post the path variable in here. You do this by typing "set path" in
    the console.

    --
    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.
  • Matthew Budge at Nov 16, 2015 at 2:34 pm
    I've attached the output from "fip.exe go" and it does the same thing. It
    doesn't output anything, it just hangs.

    Path=C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA
    Corporation\PhysX\Common;C:\Program Files (x86)\Intel\iCLS
    Client\;C:\Program Files\Intel\iCLS
    Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program
    Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program
    Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files
    (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files
    (x86)\Intel\Intel(R) Management Engine
    Components\IPT;C:\Go\bin;C:\ProgramData\Oracle\Java\javapath;C:\Program
    Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files
    (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS
    Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program
    Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program
    Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files
    (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files
    (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Go\bin
    PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
    On 16 November 2015 at 13:38, wrote:

    Can you post the path variable in here. You do this by typing "set path"
    in the console.
    --
    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.
  • Robert Melton at Nov 16, 2015 at 2:39 pm
    Can you run "go" by itself, it should output the help blurb.  If you
    can't it either isn't in path, running something else (something else IS
    in path) or being blocked by some misbehaving security software.

    --
      Robert Melton | http://robertmelton.com


    --
    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.
  • Matthew Budge at Nov 16, 2015 at 3:01 pm
    I just disabled avast and tried again and it worked. Apparently avast
    doesn't like Go!

    Thanks for your help.
    On 16 November 2015 at 14:39, Robert Melton wrote:

    Can you run "go" by itself, it should output the help blurb. If you can't
    it either isn't in path, running something else (something else IS in path)
    or being blocked by some misbehaving security software.

    --
    Robert Melton | http://robertmelton.com


    --
    You received this message because you are subscribed to a topic in the
    Google Groups "golang-nuts" group.
    To unsubscribe from this topic, visit
    https://groups.google.com/d/topic/golang-nuts/KQ6Hmz4Js70/unsubscribe.
    To unsubscribe from this group and all its topics, send an email to
    golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
    --
    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.
  • Arie van Wingerden at Nov 16, 2015 at 3:57 pm
    Aha! Good catch!
    Indeed the program I sent to you to check the path was also built with Go.
    Bad feature of Avast then :-(

    2015-11-16 16:01 GMT+01:00 Matthew Budge <mbudge1@gmail.com>:
    I just disabled avast and tried again and it worked. Apparently avast
    doesn't like Go!

    Thanks for your help.
    On 16 November 2015 at 14:39, Robert Melton wrote:

    Can you run "go" by itself, it should output the help blurb. If you
    can't it either isn't in path, running something else (something else IS in
    path) or being blocked by some misbehaving security software.

    --
    Robert Melton | http://robertmelton.com


    --
    You received this message because you are subscribed to a topic in the
    Google Groups "golang-nuts" group.
    To unsubscribe from this topic, visit
    https://groups.google.com/d/topic/golang-nuts/KQ6Hmz4Js70/unsubscribe.
    To unsubscribe from this group and all its topics, send an email to
    golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
    --
    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.
    --
    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.
  • Dave Cheney at Nov 16, 2015 at 11:35 pm
    Chalk yet another failure up to Avast, the software that secures your
    computer by making it unable to be used.
    On Tuesday, 17 November 2015 02:57:14 UTC+11, Arie van Wingerden wrote:

    Aha! Good catch!
    Indeed the program I sent to you to check the path was also built with Go.
    Bad feature of Avast then :-(

    2015-11-16 16:01 GMT+01:00 Matthew Budge <mbu...@gmail.com <javascript:>>:
    I just disabled avast and tried again and it worked. Apparently avast
    doesn't like Go!

    Thanks for your help.

    On 16 November 2015 at 14:39, Robert Melton <rob...@robertmelton.com
    <javascript:>> wrote:
    Can you run "go" by itself, it should output the help blurb. If you
    can't it either isn't in path, running something else (something else IS in
    path) or being blocked by some misbehaving security software.

    --
    Robert Melton | http://robertmelton.com


    --
    You received this message because you are subscribed to a topic in the
    Google Groups "golang-nuts" group.
    To unsubscribe from this topic, visit
    https://groups.google.com/d/topic/golang-nuts/KQ6Hmz4Js70/unsubscribe.
    To unsubscribe from this group and all its topics, send an email to
    golang-nuts...@googlegroups.com <javascript:>.
    For more options, visit https://groups.google.com/d/optout.
    --
    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...@googlegroups.com <javascript:>.
    For more options, visit https://groups.google.com/d/optout.
    --
    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.
  • Andrewchamberss at Nov 17, 2015 at 9:18 am
    Not to mention virus scanners are usually full of buffer overflows, automatically scan strange files and run themselves as administrator making themselves easy attack vectors.

    I think they are more of a liability than a help.

    --
    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
postedNov 15, '15 at 3:46p
activeNov 17, '15 at 9:18a
posts11
users6
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase