fix: 25-funcs explanations
This commit is contained in:
@ -11,10 +11,9 @@ import "fmt"
|
|||||||
|
|
||||||
func showN() {
|
func showN() {
|
||||||
if N == 0 {
|
if N == 0 {
|
||||||
fmt.Println("showN : N is zero, increment it.")
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
fmt.Printf("showN : N = %d\n", N)
|
fmt.Printf("showN : N is %d\n", N)
|
||||||
}
|
}
|
||||||
|
|
||||||
func incrN() {
|
func incrN() {
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
// BUT NOT like so:
|
// BUT NOT like so:
|
||||||
// go run main.go
|
// go run main.go
|
||||||
//
|
//
|
||||||
// Because, the compiler needs to see global.go too
|
// Because, the compiler needs to see bad.go too
|
||||||
// It can't magically find global.go — what you give is what you get.
|
// It can't magically find bad.go — what you give is what you get.
|
||||||
//
|
//
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
@ -5,21 +5,6 @@
|
|||||||
// License: https://creativecommons.org/licenses/by-nc-sa/4.0/
|
// License: https://creativecommons.org/licenses/by-nc-sa/4.0/
|
||||||
//
|
//
|
||||||
|
|
||||||
//
|
|
||||||
// You need run this program like so:
|
|
||||||
// go run .
|
|
||||||
//
|
|
||||||
// This will magically pass all the go files in the current directory to the
|
|
||||||
// Go compiler.
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// BUT NOT like so:
|
|
||||||
// go run main.go
|
|
||||||
//
|
|
||||||
// Because, the compiler needs to see global.go too
|
|
||||||
// It can't magically find global.go — what you give is what you get.
|
|
||||||
//
|
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
Reference in New Issue
Block a user