Use switch instead of if-else to make more golang style control
structures
Also time.Sub should replaced by time.Since
Merge pull request #5 from onetown/master

Use switch instead of if-else to make more golang style control structures