Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

Fix/gofmt and read cert cleanup #64

Merged
merged 3 commits into from
Aug 25, 2023

Conversation

smoser
Copy link
Contributor

@smoser smoser commented Aug 25, 2023

  • Reduce code in extractPubkey by using readCertificateFromFile.

    Less software in the world.

  • Add a 'gofmt' target for make and call it as a trust dep and from c-i

    My editor automatically runs 'gofmt'. So its annoying to open a file,
    make a change and see a bunch of whitespace unrelated changes in place.
    Ok, maybe I should fix my editor, but really 'gofmt' code is the norm.

    The change here is to run gofmt and fail the build if it makes changes.
    That way those changes don't get checked in and don't pass c-i if it
    hasn't run.

  • Run gofmt and commit changes.

    These are whitespace only changes, the result of running gofmt.

These are whitespace only changes, the result of running gofmt.

Signed-off-by: Scott Moser <[email protected]>
My editor automatically runs 'gofmt'.  So its annoying to open a file,
make a change and see a bunch of whitespace unrelated changes in place.
Ok, maybe I should fix my editor, but really 'gofmt' code is the norm.

The change here is to run gofmt and fail the build if it makes changes.
That way those changes don't get checked in and don't pass c-i if it
hasn't run.

Signed-off-by: Scott Moser <[email protected]>
Less software in the world.

Signed-off-by: Scott Moser <[email protected]>
Copy link
Contributor

@hallyn hallyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the go fmt in the github action is useful. But it won't hurt anything, most likely.

I find automatic mandatory linting by a constantly changing set of rules to be a bad idea. But I admit I'm extra bad about this, so maybe the side effects are better than the disease.

@smoser
Copy link
Contributor Author

smoser commented Aug 25, 2023

I don't think the go fmt in the github action is useful. But it won't hurt anything, most likely.

i think you didn't realize that the target fails (and c-i will thus fail) if gofmt makes changes.
that way, we dont check in changes that haven't been go-fmt'd.

@smoser smoser merged commit 35efe3f into project-machine:main Aug 25, 2023
3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants