Help us shape the future of Go! Take the 2026 Go Developer Survey

format

package
v1.9.10 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// SearchDir the swag would be parse
	SearchDir string

	// excludes dirs and files in SearchDir,comma separated
	Excludes string

	// MainFile (DEPRECATED)
	MainFile string
}

Config specifies configuration for a format run

type Format

type Format struct {
	// contains filtered or unexported fields
}

Format implements `fmt` command for formatting swag comments in Go source files.

func New

func New() *Format

New creates a new Format instance

func (*Format) Build

func (f *Format) Build(config *Config) error

Build runs formatter according to configuration in config

Jump to

Keyboard shortcuts

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