Created
June 1, 2019 11:34
-
-
Save matryer/cb8c249b3d4a2dc3d4f0d00d3b1aba45 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"fmt" | |
"os" | |
"os/exec" | |
) | |
var speakers = map[string]bool{ | |
"Eduardo Alves": true, | |
"Bastian Winkler": true, | |
"Xabi": true, | |
"The Italian Trio. Filippo Valsorda, Roberto Clapis, Giovanni Bajo": true, | |
"Tiago Mendes": true, | |
"Denys Nahurnyi": true, | |
"Syamala Umamaheswaran": true, | |
"Takuya Ueda": true, | |
"Wojtek Siudzinski": true, | |
"Haiko Schol": true, | |
"Egon Elbre": true, | |
} | |
func main() { | |
s := bufio.NewScanner(os.Stdin) | |
// first speaker is fixed | |
announce("Joonatan Samuel") | |
s.Scan() | |
// second speaker is fixed | |
announce("Carlos Guzman") | |
// the rest... random baby! | |
for name := range speakers { | |
s.Scan() // they pressed enter | |
announce(name) | |
} | |
} | |
func announce(name string) { | |
fmt.Println("Next up:", name) | |
exec.Command("say", "Next up, please welcome the wonderful "+name).Run() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment