config

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package config handles the loading and management of the application's configuration. It parses command-line arguments and defines the runtime settings for the godoctor server, including server address, model selection, and tool enablement/disablement policies.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ListenAddr    string
	Version       bool
	Agents        bool
	ListTools     bool // List available tools for the selected profile and exit
	DefaultModel  string
	AllowedTools  map[string]bool // If non-empty, ONLY these tools are allowed
	DisabledTools map[string]bool // These tools are explicitly disabled
}

Config holds the application configuration.

func Load

func Load(args []string) (*Config, error)

Load parses command-line arguments and returns a Config struct.

func (*Config) DisableTool

func (c *Config) DisableTool(name string)

DisableTool explicitly disables a tool at runtime.

func (*Config) IsToolEnabled

func (c *Config) IsToolEnabled(name string) bool

IsToolEnabled checks if a tool should be enabled.

Jump to

Keyboard shortcuts

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