cli

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2025 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CLI

func CLI() int

CLI runs xstruct from a Command Line Interface and returns an exit status.

Types

type Environment

type Environment struct {
	// Dirpath represents the relative path to the directory that is extracted.
	DirPath string

	// Pkg represents the output file's package.
	Pkg string

	// Global represents an option which determines whether to extract global variables and constants.
	Global bool

	// Funcs represents an option which determines whether to extract function declarations.
	Funcs bool

	// Sort represents an option which determines whether to sort the extracted objects.
	Sort bool
}

Environment represents the xstruct environment.

func (*Environment) Run

func (e *Environment) Run() (string, error)

Run runs xstruct programmatically using the given Environment's YMLPath.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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