Documentation
¶
Index ¶
- func BruteForceIndentation(ctx context.Context, startIndentation string, cfg Configuration, ...) (io.Reader, error)
- func BuildTabWriter(writer io.Writer) *tabwriter.Writer
- func Format(ctx context.Context, provider Provider, cfg ConfigurationProvider, ...) (io.Reader, error)
- func HasShebang(bs []byte) bool
- func Shebang(bs []byte) string
- type Configuration
- type ConfigurationProvider
- type Provider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BruteForceIndentation ¶ added in v2.8.0
func HasShebang ¶ added in v2.8.0
HasShebang reports whether bs begins with a valid shell shebang. It supports variations with /usr and env.
Types ¶
type Configuration ¶
func NewBasicConfigurationProvider ¶
func NewBasicConfigurationProvider(tabs bool, indentSize int) Configuration
type ConfigurationProvider ¶
type ConfigurationProvider interface {
GetConfigurationForFileType(ctx context.Context, filename string) (Configuration, error)
}
func NewDefaultConfigurationProvider ¶ added in v2.7.2
func NewDefaultConfigurationProvider() ConfigurationProvider
Click to show internal directories.
Click to hide internal directories.