Skip to content

Instantly share code, notes, and snippets.

@dunstontc
Created May 23, 2018 18:31
Show Gist options
  • Save dunstontc/307b6f3b10fa15de916827f1ce4007fe to your computer and use it in GitHub Desktop.
Save dunstontc/307b6f3b10fa15de916827f1ce4007fe to your computer and use it in GitHub Desktop.
hello.go

hello.go

Structure

.
├── hello.go
├── main.go
└── readme.md

Usage

# to run
go run *.go

# to build
go build *.go
package main
import (
"fmt"
)
// Hello prints out a sentence.
func Hello(sentence string) {
fmt.Printf("%s\n", sentence)
}
package main
func main() {
Hello("Here is how.")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment