Files
bootdotdev-fcc-learn-golang…/course/13-channels/exercises/8-select_default/code.go
wagslane 9be3074de6 first
2023-05-01 15:25:27 -06:00

36 lines
581 B
Go

package main
import (
"fmt"
"time"
)
func saveBackups(snapshotTicker, saveAfter <-chan time.Time) {
// ?
}
// TEST SUITE - Don't touch below this line
func takeSnapshot() {
fmt.Println("Taking a backup snapshot...")
}
func saveSnapshot() {
fmt.Println("All backups saved!")
}
func waitForData() {
fmt.Println("Nothing to do, waiting...")
}
func test() {
snapshotTicker := time.Tick(800 * time.Millisecond)
saveAfter := time.After(2800 * time.Millisecond)
saveBackups(snapshotTicker, saveAfter)
fmt.Println("===========================")
}
func main() {
test()
}