mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-19 18:29:21 +08:00
update book code
This commit is contained in:
10
eBook/examples/chapter_13/even/even/even.go
Normal file
10
eBook/examples/chapter_13/even/even/even.go
Normal file
@@ -0,0 +1,10 @@
|
||||
// even.go
|
||||
package even
|
||||
|
||||
func Even(i int) bool { // Exported function
|
||||
return i%2 == 0
|
||||
}
|
||||
|
||||
func Odd(i int) bool { // Exported function
|
||||
return i%2 != 0
|
||||
}
|
Reference in New Issue
Block a user