format

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Format

func Format(src []byte) ([]byte, bool, error)

func FormatFiles

func FormatFiles(ctx context.Context, files []string, opt FormatOpts) error

FormatFiles format jsonnet files

Types

type FormatOpts

type FormatOpts struct {
	// ReplaceFile when enabled, will write formatted code to same file
	ReplaceFile bool `flag:"write,w" desc:"write result to (source) file instead of stdout"`
	// PrintNames when enabled, will print formatted result of each file
	PrintNames bool `flag:"list,l" `
}

FormatOpts

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL