Skip to content

xujihui1985/learninggo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

learninggo

Setup go developing environment

install golang

download from here

setup GOPATH and GOROOT env

export GOPATH=$HOME/code/go
export PATH=$GOPATH/bin:$PATH

$GOPATH is where you put all of your go code

initialize gopath

mkdir -p $GOPATH/{bin,pkg,src}

congratulation, you are good to go

run your hello world

mkdir -p $GOPATH/src/hellogo

cat > $GOPATH/src/hellogo/main.go <<EOF
package main

import "fmt"

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

EOF

go run $GOPATH/src/hellogo/main.go

About

go playground

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published