https://github.com/namchee/retlen
Limits the number of returns in a Go function
https://github.com/namchee/retlen
go linter
Last synced: over 1 year ago
JSON representation
Limits the number of returns in a Go function
- Host: GitHub
- URL: https://github.com/namchee/retlen
- Owner: Namchee
- License: mit
- Created: 2022-09-15T13:41:39.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-02-22T12:52:37.000Z (over 3 years ago)
- Last Synced: 2025-01-30T03:28:05.171Z (over 1 year ago)
- Topics: go, linter
- Language: Go
- Homepage:
- Size: 15.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# retlen
Checks the number of return values from functions.
## Installation
```shell
go install github.com/Namchee/retlen@latest
```
## Usage
```
retlen [-flag] [package]
```
## Flags
All options are provided through CLI flags.
Name | Type | Default | Description
---- | ---- | ------- | -----------
`maxReturn` | `int` | `2` | Maximum number of variables allowed to be returned by a function
`includeTest` | `bool` | `false` | Include test functions (starts with `Test`)