Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README: apply gofmt to examples #1687

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexandear
Copy link
Contributor

Summary

Format Go code in the README with gofmt and remove empty lines.

Changes

  • Replace spaces with tabs.
  • Add empty lines between imports.
  • Remove empty lines in blocks.

Motivation

The code should be formatted the same as gofmt even in the documentation.

@dolmen
Copy link
Collaborator

dolmen commented Jan 7, 2025

It would be helpful to have a CI test that ensures this remains in the future. Any pointer to such a tool that would extract blocks of go code from a Markdown document and report diffs?

@dolmen dolmen force-pushed the docs-format-go-examples branch from ed2aad8 to 3cf0926 Compare January 7, 2025 10:35
@dolmen dolmen changed the title docs: Format examples in README README: apply gofmt to examples Jan 7, 2025
@ccoVeille
Copy link
Contributor

I'm using mdsf for formatting fenced blocks in Markdown files.

https://github.com/hougesen/mdsf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants