Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jerome1337/gofmt-action
Ready to use gofmt GitHub action
https://github.com/jerome1337/gofmt-action
Last synced: 6 days ago
JSON representation
Ready to use gofmt GitHub action
- Host: GitHub
- URL: https://github.com/jerome1337/gofmt-action
- Owner: Jerome1337
- License: mit
- Created: 2020-04-13T13:49:01.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-11-14T10:13:37.000Z (about 2 years ago)
- Last Synced: 2024-10-31T10:38:11.180Z (2 months ago)
- Language: Shell
- Size: 14.6 KB
- Stars: 13
- Watchers: 3
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Gofmt Action
This action execute gofmt command and return the command output if fail.
## Inputs
`gofmt-path`
Path where your Go files are.
This path will be used by gofmt command to check files formatting.Default one is the repository root (`./`).
`gofmt-flags`
Custom flags to pass to gofmt.
See [gofmt docs](https://golang.org/cmd/gofmt/) for available flags.Default behaviour is to list all file paths with incorrect formatting (`-l`).
## Outputs
`gofmt-output`
The gofmt output if the command fail.
For Example:
```bash
All the following files are not correctly formatted
handlers/writer.go
services/writerServices.go
```## Example Usage
```yaml
uses: Jerome1337/[email protected]
with:
gofmt-path: './src'
gofmt-flags: '-l -d'
```