config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2024 License: MIT Imports: 2 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 {
	Imports []string `yaml:"imports"`
	Structs []Struct `yaml:"structs"`
}

Config is the top-level config, listing imports (packages) to analyze and a slice of structs (each having fields).

func LoadConfig

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

LoadConfig reads a YAML file from disk and unmarshals it into Config. Returns an error if the file is invalid or not found.

type Field

type Field struct {
	Name string `yaml:"name"`
	Type string `yaml:"type"`
}

Field represents a single field within a struct: e.g., name="SomeField", type="string".

type Struct

type Struct struct {
	Name   string  `yaml:"name"`
	Fields []Field `yaml:"fields"`
}

Struct represents a single struct with a name and multiple fields.

Jump to

Keyboard shortcuts

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