Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

go build

Install it

go install


Functions

Code Block
package main

import (
  "fmt"
  "error"
)

func main() {
  result := sum(2,3)
  fmt.Println(result)


Commands

CommandDescription
go run <src.go>Run some code
go buildCompile the code. Outputs to local folder. Executable has folder as name.
go installCompiles and places the output in workspace/bin
go env GOPATHOutputs the default workspace folder

...