Winston is my virtual assistant. This project started as a fun way to ensure I never forgot an important date but has continued to evolve over the years into a clean way of providing daily updates as I wake up each morning.
This program is run using the following command structure:
package main
import "fmt"
// isEven checks if a number is even
func isEven(n int) bool {
return n%2 == 0
}
func main() {
numbers := []int{1, 2, 3, 4, 5, 6}
for _, num := range numbers {
if isEven(num) {
fmt.Printf("%d is even\n", num)
} else {
fmt.Printf("%d is odd\n", num)
}
}
}