config

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 30, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultRepositoryURL = "https://download.qt.io/"

DefaultRepositoryURL is the primary Qt mirror base URL. It is the mirror root without any repository path; online/qtsdkrepository/ is appended internally.

Variables

This section is empty.

Functions

func DefaultConcurrency

func DefaultConcurrency() int

DefaultConcurrency returns the default number of parallel downloads.

func DefaultInstallDir

func DefaultInstallDir() string

DefaultInstallDir returns the platform-appropriate default Qt install directory.

func DefaultTimeoutSeconds

func DefaultTimeoutSeconds() int

DefaultTimeoutSeconds returns the per-request HTTP timeout in seconds.

func Path

func Path() (string, error)

Path returns the path to the qvm config file.

func Save

func Save(cfg *Config) error

Save writes cfg to the default config file.

Types

type Config

type Config struct {
	Install struct {
		Dir string `toml:"dir"`
	} `toml:"install"`

	Repository struct {
		URL       string   `toml:"url"`
		Mirrors   []string `toml:"mirrors"`
		Blacklist []string `toml:"blacklist"`
	} `toml:"repository"`

	Download struct {
		Concurrency    int `toml:"concurrency"`
		TimeoutSeconds int `toml:"timeout_seconds"`
	} `toml:"download"`
}

Config holds all qvm configuration.

func Load

func Load() (*Config, error)

Load reads the config from the default config file, creating defaults if absent.

Jump to

Keyboard shortcuts

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