Created
April 15, 2019 06:54
-
-
Save romanitalian/e64b98fa18d0135f157e98b6ac0eb61a to your computer and use it in GitHub Desktop.
"go build main.go" vs "go build ."
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// $ tree | |
// . | |
// ├── main.go | |
// ├── second.go | |
// ```go build main.go``` | |
// or | |
// ```go build .``` | |
// file: main.go | |
package main | |
import ( | |
"fmt" | |
) | |
func main() { | |
fmt.Println("this is package MAIN") | |
} | |
// file: second.go | |
package main | |
import ( | |
"fmt" | |
) | |
func main() { | |
fmt.Println("this is package SECOND") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment