Sorry to hear that it was a lot shorter than hoped.
Some shocking "advice" in this thread, really highlights that a lot of people have never been in a similar situation because I guarantee that last thing they would say (or do) is any of what was written above.
If it was me, I would have gone to see him, not mentioned it, and just been normal (gone out, Xbox, Drive, Lunch, whatever). At that early stage, he hadn't even had chance to let it sink in to his own mind before someone comes around going "whoa, dude, sorry to hear you're terminal and will die soon".....
Sometimes, more often than not, saying nothing (but being there) is all that is required