Skip to content

The bodyguards are a collection of Go tools for improving the quality and performance of your Go code. The bodyguards keep your code safe from bugs

License

Notifications You must be signed in to change notification settings

goodylili/bodyguards

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bodyguards (WIP)

Bodyguards is a collection of Go tools for improving the quality and performance of your Go code. The bodyguards keep your code safe from bugs and help you write more idiomatic, functional Go code. This project is inspired by Go Report Card.

Installation and Setup

To install Bodyguards, run the following command:

go install github.com/Goodnessuc/bodyguards@latest

Next, run the bodyguards init command to initialize bodyguards for your project.

bodyguards init

The bodyguards init command will automatically create a boyguards.yaml file in your project's root directory (the directory where there's a go.mod file).

Usage

To use any of the bodyguards tools, run the following command:

bodyguards [command] [path]

The path is the path to the Go source code that you want to analyze. If no path is specified, the entire package will be analyzed or fixed.

The bodyguards.yaml Configuration File

The configuration file is a YAML file where you can specify options for Bodyguards. Here are some available options:

  • linter: Lint your Go code with golangci-lint.
  • architecture: Set up the file architecture for your program following one of the popular architectural patterns.
  • report: Generate a comprehensive report and rating of your project using Go Report Card.
  • documentation: Generate the documentation for your project with Godoc.

Here's the contents of an example bodyguards.yaml file

run:
  architecture: clean # File architecture options

  enable: # enable features
    - linter
    - report
    - godocumentation

Once you've selected the configuration options for your app; You can use the run command to run bodyguards to analyze/fix code errors with the specified options.

bodyguards run 

Additionally, You can generate a comprehensive report of the fixes/issues in your project with the report command

bodyguards report 

Contributing

If you would like to contribute to this project, please feel free to fork the repository and submit a pull request.

License

This project is licensed under the MIT License.

About

The bodyguards are a collection of Go tools for improving the quality and performance of your Go code. The bodyguards keep your code safe from bugs

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages