Fixes golint errors in pkg/api.

done