Apply various fixes pointed out by staticcheck. (#4242)
Apply various fixes pointed out by staticcheck. (#4242)

* Transform string(buf.Bytes()) to buf.String().

* Remove a bunch of unused code.

* Fix error capitalization.

* Fix issue with error overlapping.

* Fix deprecated usage of Apps without version.

* Fix file permission resolution.

* Fix comparison to boolean.

* Fix issue with variable never being used.

* Remove unused conditionsets.

* Fix error checks after fixing capitalization.

* Remove unused values in performance tests.

* Remove some more unused code.

knative-sandbox/net-certmanager,knative-sandbox/net-certmanager