Skip to content

Check code formatting using gofmt

Actions
Check code formatting using gofmt
v1.0.5
Latest
Star (13)

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/gofmt-action@v1.0.5
with:
  gofmt-path: './src'
  gofmt-flags: '-l -d'

Check code formatting using gofmt is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Check code formatting using gofmt
v1.0.5
Latest

Check code formatting using gofmt is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.