Created
July 10, 2014 04:49
-
-
Save codekoala/406b883932fec70e7adf to your computer and use it in GitHub Desktop.
Platform-specific code for Go. Simply run "go build" and run the resulting executable.
This file contains 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
package main | |
func main() { | |
hiForPlatform() | |
} |
This file contains 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
package main | |
import "fmt" | |
func hiForPlatform() { | |
fmt.Println("Hello Linux!") | |
} |
This file contains 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
package main | |
import "fmt" | |
func hiForPlatform() { | |
fmt.Println("Hello Windows!") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment