Skip to content

Jerome1337/gofmt-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 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:

All the following files are not correctly formatted
handlers/writer.go
services/writerServices.go

Example Usage

uses: Jerome1337/[email protected]
with:
  gofmt-path: './src'
  gofmt-flags: '-l -d'