format

package
v0.27.1 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package format provides a canonical formatter for GoSX source files.

The formatter preserves normal Go formatting expectations while adding consistent formatting for GSX element/attribute/children syntax.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Source

func Source(source []byte) ([]byte, error)

Source formats a GoSX source file.

Types

type Options

type Options struct {
	// IndentStr is the indentation string (default: "\t").
	IndentStr string
	// MaxLineWidth triggers wrapping for long attribute lists (default: 100).
	MaxLineWidth int
}

Options controls formatter behavior.

Jump to

Keyboard shortcuts

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