errors and warning should be logged, message variable is useless etc.

Plus substituted panic with log.Fatal due to panic not considered as best practice, certificates should be in the same directory as their caller function (p.go) and replaced multiple res. assignments with a more concise creation of an http.Response 

Errors and warnings should always be printed using the log package since it's more convenient for testing than using fmt.
https://groups.google.com/forum/#!topic/golang-nuts/TSZeX9eQ5JU