Fix `staticcheck` issues:
- S1028 use `fmt.Errorf` to construct formatted errors
- ST1017 yoda conditions
- ST1005 error message capitalization
- ST1006 avoid `self` as receiver name
- S1030 use `buf.String`
- S1011 avoid redundant loop when `append` suffices
- SA4006 unused value
- S1019 remove redundant capacity on `make` call
- SA2002 `t.Fatal` called outside of test
Exported error violates ST1012, which is ignored by this PR since rename may cause breaking changes.
Remove redundant parentheses wrapping, and use CamelCase naming while at it.
the signature for the X509_check_host function takes
a char **peername, and our vendored hostname code does
not have this argument. hilarity ensues!!
so since we never use it, just have our vendored code
ignore it.
Change-Id: I4fdf0a4cd43738e4cc7261e4e2d16a9deef1ac82