Skip to content

core go fmt

Format Go code using goimports or gofmt.

Usage

bash
core go fmt [flags]

Flags

FlagDescription
--fixFix formatting in place
--diffShow diff of changes
--checkCheck only, exit 1 if not formatted

Examples

bash
core go fmt           # Check formatting
core go fmt --fix     # Fix formatting
core go fmt --diff    # Show diff

Released under the EUPL-1.2 License.