config

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Reset

func Reset() error

Reset overwrites the config file with default values

func Save

func Save(cfg *Config) error

Save saves the configuration to file

func SetConfigPath

func SetConfigPath(path string)

SetConfigPath updates the configuration file path

Types

type Config

type Config struct {
	Provider         string  `json:"provider"`
	APIKey           string  `json:"api_key"`
	Model            string  `json:"model"`
	URL              string  `json:"url"`
	MaxLength        int     `json:"max_length"`
	Temperature      float64 `json:"temperature"`
	Proxy            string  `json:"proxy"`
	Language         string  `json:"language"`
	Timeout          int     `json:"timeout"`
	CommitType       string  `json:"commit_type"`
	CustomConvention string  `json:"custom_convention"`
	UseGitmoji       bool    `json:"use_gitmoji"`
	MaxRedirects     int     `json:"max_redirects"`
}

Config holds the main configuration structure for the gitc CLI tool

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns a default config with fallback values

func Load

func Load() (*Config, error)

Load loads the configuration from file or creates a default one if it doesn't exist

func (*Config) Validate

func (c *Config) Validate() error

Jump to

Keyboard shortcuts

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