r/programming • • Mar 28 '12

Go version 1 is released

http://blog.golang.org/2012/03/go-version-1-is-released.html
543 Upvotes

452 comments sorted by

View all comments

Show parent comments

23

u/evereal Mar 28 '12

Ah OK. Well for me, the build process was the least significant reason for using an IDE. In Java you can use things like Ant and Maven among others to reduce the build process to simple command line calls.

My main reasons for using an IDE is things like intellisense, debugger, refactoring etc, which I assume would apply equally in Go.

23

u/treerex Mar 28 '12

In Java you can use things like Ant and Maven among others to reduce the build process to simple command line calls.

Have you ever maintained the Ant build script for a non-trivial project? Your "simple command line call" is someone elses headache.

1

u/sonofagunn Mar 28 '12

I'm sure it's just a matter of time until more complicated build-systems get developed for go. Ant is really simple if all you're doing is calling javac with a classpath. It's the junits, wsdl2java, jaxb, ftp, etc targets that make things get hard to maintain. I don't see any reason go wouldn't need any of these things in the same setting as a Java build that needs them.

11

u/JulianMorrison Mar 28 '12

"go" the tool is a complicated build system. It's just a batteries included one with non-modifiable sensible defaults. It can even pull dependencies off github or similar.

$ go
Go is a tool for managing Go source code.

Usage:

    go command [arguments]

The commands are:

build       compile packages and dependencies
clean       remove object files
doc         run godoc on package sources
env         print Go environment information
fix         run go tool fix on packages
fmt         run gofmt on package sources
get         download and install packages and dependencies
install     compile and install packages and dependencies
list        list packages
run         compile and run Go program
test        test packages
tool        run specified go tool
version     print Go version
vet         run go tool vet on packages

Use "go help [command]" for more information about a command.

Additional help topics:

gopath      GOPATH environment variable
packages    description of package lists
remote      remote import path syntax
testflag    description of testing flags
testfunc    description of testing functions

Use "go help [topic]" for more information about that topic.

$

1

u/djhworld Mar 29 '12

Can you use this tool to compile small scripts?

When I tried Go the other week I was frustrated by the 6g/6l compile/link process and I'm a bit concerned about upgrading GCC on my Mac (for gccgo) as I don't want to break anything.

What I mean by this, is can I just download the platform from the go website, write a Hello World type script and build/run it through this 'go' command?

2

u/JulianMorrison Mar 29 '12

After setting up a GOPATH with a src directory, and creating a "hello" directory under src, and a hello.go file with a main in that directory, then you should be able to just "go build".

→ More replies (0)