config

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildContextConfig added in v0.1.1

type BuildContextConfig struct {
	GOOS       string   `yaml:"goos"`
	GOARCH     string   `yaml:"goarch"`
	CGOEnabled *bool    `yaml:"cgo_enabled,omitempty"`
	BuildTags  []string `yaml:"build_tags,omitempty"`
	ToolTags   []string `yaml:"tool_tags,omitempty"`
}

BuildContextConfig selects one coherent Go build variant for typed method reference analysis. Omitted contexts default to the running Go toolchain's GOOS, GOARCH, cgo, release tags, and tool tags.

type Config

type Config struct {
	Repos                 []RepoConfig         `yaml:"repos"`
	ExcludePatterns       []string             `yaml:"exclude_patterns"`
	IncludeTests          bool                 `yaml:"include_tests"`
	TypedMethodReferences bool                 `yaml:"typed_method_references"`
	BuildContexts         []BuildContextConfig `yaml:"build_contexts"`
	Transport             string               `yaml:"transport"`
	Port                  int                  `yaml:"port"`
}

Config holds the server configuration.

func Load

func Load() (*Config, error)

Load reads configuration from env vars or YAML file.

Priority:

  1. GOAST_CONFIG env var → load YAML file at that path
  2. GOAST_REPOS env var → comma-separated repo paths
  3. config.yaml in working directory

type RepoConfig

type RepoConfig struct {
	Name                  string `yaml:"name,omitempty"`
	Path                  string `yaml:"path"`
	IncludeTests          *bool  `yaml:"include_tests,omitempty"`
	TypedMethodReferences *bool  `yaml:"typed_method_references,omitempty"`
}

RepoConfig describes a repository to index.

func (RepoConfig) TestsEnabled added in v0.1.1

func (r RepoConfig) TestsEnabled(defaultValue bool) bool

TestsEnabled returns the repository-specific test-indexing setting when one is present, otherwise the configuration-wide default.

func (RepoConfig) TypedReferencesEnabled added in v0.1.1

func (r RepoConfig) TypedReferencesEnabled(defaultValue bool) bool

TypedReferencesEnabled returns the repository-specific typed-reference setting when one is present, otherwise the configuration-wide default.

Jump to

Keyboard shortcuts

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