main.go: use a switch-case to do http, imap