Skip to content

snippet(go): reformat & revise snippets for consistency #101

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

Merged
merged 1 commit into from
Sep 16, 2023

Conversation

weidaolee
Copy link
Contributor

Summary:

This pull request introduces consistent formatting changes to various Go code snippets in the 'go-mode' directory. The changes include:

  • Adding spaces between function parameters and return types.
  • Formatting import statements to use parentheses for multiple imports.
  • Updating struct snippets to include a name for the struct type.
  • Updating the 'switch' snippet to include an expression.
  • Adding type for creating a new struct or interface.

Changes Made:

  • In 'go-mode/f' and 'go-mode/func', added spaces between function parameters and return types to follow go convention.

  • In 'go-mode/method', added spaces between function parameters and return types to follow go convention.

  • In 'go-mode/imp' and 'go-mode/import', reformatted import statements to use parentheses for multiple imports.

  • In 'go-mode/struct', added a name for the struct type for clarity.

  • Add a new file go-mode/type for creating a new struct or interface.

  • In 'go-mode/switch', updated the 'switch' snippet to include an expression for better usage.

These changes improve code readability and maintain consistency throughout the 'go-mode' snippets.

Related Issues:
None

Replace this with a summary of what you've changed and why, followed by a list of issues it affects, if any.

Fix: #0000
Ref: #0000
Close: #0000


  • I searched the issue tracker and this hasn't been PRed before.
  • My changes are not on the do-not-PR list for this project.
  • My commits conform to the git conventions.
  • Any relevant issues or PRs have been linked to.

**Summary:**

This pull request introduces consistent formatting changes to various Go
code snippets in the 'go-mode' directory. The changes include:

- Adding spaces between function parameters and return types.
- Formatting import statements to use parentheses for multiple imports.
- Updating struct snippets to include a name for the struct type.
- Updating the 'switch' snippet to include an expression.
- Adding `type` for creating a new struct or interface.

**Changes Made:**

- In 'go-mode/f' and 'go-mode/func', added spaces between function
  parameters and return types to follow go convention.

- In 'go-mode/method', added spaces between function parameters and
  return types to follow go convention.

- In 'go-mode/imp' and 'go-mode/import', reformatted import
  statements to use parentheses for multiple imports.

- In 'go-mode/struct', added a name for the struct type for clarity.

- Add a new file `go-mode/type` for creating a new struct or interface.

- In 'go-mode/switch', updated the 'switch' snippet to include an expression for better usage.

These changes improve code readability and maintain consistency throughout the 'go-mode' snippets.

**Related Issues:**
None
@weidaolee weidaolee force-pushed the fix-formating-for-go-mode branch from 3a98343 to 4cbb007 Compare September 16, 2023 11:45
@hlissner hlissner added is:snippet Requests that a snippet be added or removed mode:go labels Sep 16, 2023
@hlissner hlissner added this to the v2.0 milestone Sep 16, 2023
@hlissner hlissner changed the title fix(go-mode): Introduces consistent formatting changes to Go snippets snippet(go): reformat & revise snippets for consistency Sep 16, 2023
@hlissner hlissner merged commit 926eb54 into doomemacs:master Sep 16, 2023
@hlissner
Copy link
Member

LGTM. Thanks for your help!

@weidaolee weidaolee deleted the fix-formating-for-go-mode branch September 21, 2023 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:snippet Requests that a snippet be added or removed mode:go
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants