config

package
v1.1.10 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Example

func Example() string

Example generates an example polyloft.toml configuration

Types

type Config

type Config struct {
	Project      ProjectConfig      `toml:"project"`
	Dependencies DependenciesConfig `toml:"dependencies"`
}

Config represents the polyloft.toml configuration file structure

func Load

func Load(path string) (*Config, error)

Load reads and parses a polyloft.toml configuration file

func LoadDefault

func LoadDefault() (*Config, error)

LoadDefault attempts to load polyloft.toml from the current directory

type DependenciesConfig

type DependenciesConfig struct {
	Go []GoDependency `toml:"go"`
	Pf []PfDependency `toml:"pf"`
}

DependenciesConfig contains both Go and Polyloft library dependencies

type GoDependency

type GoDependency struct {
	Name    string `toml:"name"`
	Version string `toml:"version"`
}

GoDependency represents a Go library dependency for compatibility

type PfDependency

type PfDependency struct {
	Name    string `toml:"name"`
	Version string `toml:"version"`
	Source  string `toml:"source,omitempty"` // Optional: custom source URL
}

PfDependency represents a Polyloft library dependency

type ProjectConfig

type ProjectConfig struct {
	EntryPoint string `toml:"entry_point"`
	Name       string `toml:"name"`
	Version    string `toml:"version"`
}

ProjectConfig contains project-level settings

Jump to

Keyboard shortcuts

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