fix: coding style and file format for chapter 9.

This commit is contained in:
Bo-Yi Wu
2017-02-11 12:30:01 +08:00
parent d9041c7fc3
commit cee64d1429
8 changed files with 207 additions and 205 deletions

View File

@@ -1,27 +1,26 @@
package greetings
import "time"
func GoodDay(name string) string {
return "Good Day " + name
}
func GoodNight(name string) string{
return "Good Night " + name
}
func IsAM() bool {
localTime := time.Now()
return localTime.Hour() <= 12
}
func IsAfternoon() bool {
localTime := time.Now()
return localTime.Hour() <= 18
}
func IsEvening() bool {
localTime := time.Now()
return localTime.Hour() <= 22
}
package greetings
import "time"
func GoodDay(name string) string {
return "Good Day " + name
}
func GoodNight(name string) string {
return "Good Night " + name
}
func IsAM() bool {
localTime := time.Now()
return localTime.Hour() <= 12
}
func IsAfternoon() bool {
localTime := time.Now()
return localTime.Hour() <= 18
}
func IsEvening() bool {
localTime := time.Now()
return localTime.Hour() <= 22
}