config

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: MIT Imports: 9 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 {
	// List of sources to be used by the finder
	Sources []finder.Source

	// Flag to indicate if output should be expanded
	// Useful to hide the user's home directory
	ExpandOutput bool

	// Flag to indicate if measurement should be performed
	Measure bool

	// Flag to list results
	List bool

	// Selector for displaying the projects
	Selector string

	// Flag to display only unique projects.
	Unique bool

	// Type of sorting.
	Sort string
}

Config represents the configuration structure for the application.

func Load

func Load(params *LoadParams) (*Config, error)

Load reads the configuration from a JSON file at the specified path.

type LoadParams

type LoadParams struct {
	Selector     string
	Sort         string
	Path         string
	ExpandOutput int8
	Unique       int8
	Measure      bool
	List         bool
}

type Parser added in v0.4.0

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

func NewParser added in v0.4.0

func NewParser(r io.Reader, cfg *Config) *Parser

func (*Parser) Run added in v0.4.0

func (p *Parser) Run() error

Jump to

Keyboard shortcuts

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