27 lines
399 B
Go
27 lines
399 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
f "fmt"
|
|
)
|
|
|
|
// import "fmt" //error reimporting same
|
|
|
|
const done = false //package scoped
|
|
|
|
func main() {
|
|
var task = "Running" //local (block) scoped
|
|
fmt.Println(task, done)
|
|
|
|
const done = true //local scoped
|
|
f.Printf("done in main() is %v\n", done)
|
|
f1()
|
|
|
|
f.Println("Bye!")
|
|
}
|
|
|
|
func f1() {
|
|
fmt.Printf("done in f1(): %v\n", done) //this isdone from package scope
|
|
}
|