INNER CODE UNIT · Go

func

envoyproxy/ai-gateway · cmd/aigw/main.go:105

func (c *cmdRun) BeforeApply(_ *kong.Context) error {
	// Set RunID default if not provided
	if c.RunID == "" {
		c.RunID = generateRunID(time.Now())
	}

	// Set Path to default config.yaml if it exists and Path not provided
	if c.Path == "" && c.dirs != nil {
		defaultPath := c.dirs.ConfigHome + "/config.yaml"
		if _, err := os.Stat(defaultPath); err == nil {
			c.Path = defaultPath
		}
	}
	// Expand Path (handles ~/, env vars, and converts to absolute)
	c.Path = expandPath(c.Path)

	return nil
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…