diff --git a/25-functions/01-basics/bad.go b/25-functions/01-basics/bad.go index 5867504..ebf38be 100644 --- a/25-functions/01-basics/bad.go +++ b/25-functions/01-basics/bad.go @@ -11,10 +11,9 @@ import "fmt" func showN() { if N == 0 { - fmt.Println("showN : N is zero, increment it.") return } - fmt.Printf("showN : N = %d\n", N) + fmt.Printf("showN : N is %d\n", N) } func incrN() { diff --git a/25-functions/01-basics/main.go b/25-functions/01-basics/main.go index d7d9272..c7868f3 100644 --- a/25-functions/01-basics/main.go +++ b/25-functions/01-basics/main.go @@ -16,8 +16,8 @@ // 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. +// Because, the compiler needs to see bad.go too +// It can't magically find bad.go — what you give is what you get. // package main diff --git a/25-functions/02-basics/main.go b/25-functions/02-basics/main.go index 8f39e6b..cda556e 100644 --- a/25-functions/02-basics/main.go +++ b/25-functions/02-basics/main.go @@ -5,21 +5,6 @@ // 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 import (