pulumi/sdk/go/common/util
Fraser Waters 16d9f4c167
Enable perfsprint linter (#14813)
<!--- 
Thanks so much for your contribution! If this is your first time
contributing, please ensure that you have read the
[CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md)
documentation.
-->

# Description

<!--- Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context. -->

Prompted by a comment in another review:
https://github.com/pulumi/pulumi/pull/14654#discussion_r1419995945

This lints that we don't use `fmt.Errorf` when `errors.New` will
suffice, it also covers a load of other cases where `Sprintf` is
sub-optimal.

Most of these edits were made by running `perfsprint --fix`.

## Checklist

- [x] I have run `make tidy` to update any new dependencies
- [x] I have run `make lint` to verify my code passes the lint check
  - [x] I have formatted my code using `gofumpt`

<!--- Please provide details if the checkbox below is to be left
unchecked. -->
- [ ] I have added tests that prove my fix is effective or that my
feature works
<!--- 
User-facing changes require a CHANGELOG entry.
-->
- [ ] I have run `make changelog` and committed the
`changelog/pending/<file>` documenting my change
<!--
If the change(s) in this PR is a modification of an existing call to the
Pulumi Cloud,
then the service should honor older versions of the CLI where this
change would not exist.
You must then bump the API version in
/pkg/backend/httpstate/client/api.go, as well as add
it to the service.
-->
- [ ] Yes, there are changes in this PR that warrants bumping the Pulumi
Cloud API version
<!-- @Pulumi employees: If yes, you must submit corresponding changes in
the service repo. -->
2023-12-12 12:19:42 +00:00
..
archive sdk/go/common/util cleanup 2023-03-10 08:49:00 +00:00
buildutil sdk/go/common/util cleanup 2023-03-10 08:49:00 +00:00
ciutil chore: Update doc comments, coding style, fix lint 2022-10-13 13:50:49 -07:00
cmdutil Use EqualError/ErrorContains instead of Error (#14737) 2023-12-08 06:40:14 +00:00
contract sdk/contract: Deprecate non-f variants 2023-03-03 14:37:59 -08:00
deepcopy all: Fix revive issues 2023-03-21 08:55:11 -07:00
env Add tokens.StackName (#14487) 2023-11-15 07:44:54 +00:00
executable Enable perfsprint linter (#14813) 2023-12-12 12:19:42 +00:00
fsutil Don't swallow file not found in fsutil.FileCopy (#14695) 2023-12-06 13:29:40 +00:00
gitutil Use EqualError/ErrorContains instead of Error (#14737) 2023-12-08 06:40:14 +00:00
goversion Use EqualError/ErrorContains instead of Error (#14737) 2023-12-08 06:40:14 +00:00
httputil all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
logging Use slice.Prealloc instead of make([]T, 0, ...) 2023-06-29 11:27:50 +01:00
mapper Use EqualError/ErrorContains instead of Error (#14737) 2023-12-08 06:40:14 +00:00
result Support bailing from RunFunc (#13804) 2023-08-29 07:43:40 +00:00
retry sdk/common/retry: Fix extraneous backoff 2023-03-24 16:39:02 -07:00
rpcutil all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
yamlutil all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00