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

modeline

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2025 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateModeline

func GenerateModeline(nodes []string, endpoints []string, templates []string) (string, error)

GenerateModeline creates a modeline string using JSON formatting for values

Types

type Config

type Config struct {
	Nodes     []string
	Endpoints []string
	Templates []string
}

Config structure for storing settings from modeline

func ParseModeline

func ParseModeline(line string) (*Config, error)

ParseModeline parses a modeline string and populates the Config structure

func ReadAndParseModeline

func ReadAndParseModeline(filePath string) (*Config, error)

ReadAndParseModeline reads the first line from a file and parses the modeline.

Jump to

Keyboard shortcuts

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