format

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 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 `name:"write,w" usage:"write result to (source) file instead of stdout"`
	// PrintNames when enabled, will print formatted result of each file
	PrintNames bool `name:"list,l" `
}

FormatOpts

Jump to

Keyboard shortcuts

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