Refactor main.go for readability and less duplication.
Refactor main.go for readability and less duplication.

TNG/gpg-validation-server,TNG/openpgp-validation-server,TNG/gpg-validation-server,TNG/openpgp-validation-server