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

chore: Refactor sample code into separate files #1085

Merged
merged 2 commits into from
Dec 8, 2023

Conversation

ccojocar
Copy link
Member

@ccojocar ccojocar commented Dec 8, 2023

Split the code in source.go to individual sample files, one per rule. This will help contributors submit samples for new rules, or improvements to existing rules. The cgo sample was all that was left after refactoring, which resulted in its own sample file.

Sample code was also formatted to have some level of consistency. Each sample go "file" attempts to keep the formatting of gofmt, and each code sample is in its own section in the sample file.

adambkaplan and others added 2 commits December 8, 2023 14:20
Split the code in `source.go` to individual sample files, one per rule.
This will help contributors submit samples for new rules, or
improvements to existing rules. The cgo sample was all that was left
after refactoring, which resulted in its own sample file.

Sample code was also formatted to have some level of consistency.
Each sample go "file" attempts to keep the formatting of `gofmt`, and
each code sample is in its own section in the sample file.

Signed-off-by: Adam Kaplan <[email protected]>
@ccojocar ccojocar merged commit 2aad3f0 into master Dec 8, 2023
7 checks passed
@ccojocar ccojocar deleted the split-source-examples branch May 13, 2024 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants