Documentation
¶
Index ¶
- func IsDarwin() bool
- func IsLinux() bool
- func IsWindows() bool
- type Paths
- func (p *Paths) AgentPIDFile() string
- func (p *Paths) BinDir() string
- func (p *Paths) CacheDir() string
- func (p *Paths) ConfigDir() string
- func (p *Paths) EnsureAllDirs() error
- func (p *Paths) GlobPattern(prefix string) string
- func (p *Paths) LibDir() string
- func (p *Paths) StateDir() string
- func (p *Paths) TempDir() string
- func (p *Paths) UserDir() string
- func (p *Paths) WithConfigDir(dir string) *Paths
- func (p *Paths) WithStateDir(dir string) *Paths
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Paths ¶
type Paths struct {
// contains filtered or unexported fields
}
Paths provides cross-platform path resolution for ggo
func DefaultPaths ¶
func DefaultPaths() *Paths
DefaultPaths returns the default paths for the current platform All paths are stored in the user directory (~/.gpugo)
func (*Paths) AgentPIDFile ¶
AgentPIDFile returns the path to the agent PID file All platforms: ~/.gpugo/state/agent.pid (or StateDir/agent.pid)
func (*Paths) BinDir ¶
BinDir returns the directory for binaries All platforms: ~/.gpugo/bin (or UserDir/bin)
func (*Paths) CacheDir ¶
CacheDir returns the cache directory for downloaded files All platforms: ~/.gpugo/cache (or UserDir/cache)
func (*Paths) ConfigDir ¶
ConfigDir returns the configuration directory All platforms: ~/.gpugo/config (or UserDir/config)
func (*Paths) EnsureAllDirs ¶
EnsureAllDirs creates all required directories
func (*Paths) GlobPattern ¶
GlobPattern returns the platform-appropriate glob pattern for temp cleanup
func (*Paths) LibDir ¶
LibDir returns the directory for shared libraries All platforms: ~/.gpugo/lib (or UserDir/lib)
func (*Paths) StateDir ¶
StateDir returns the state directory for runtime data All platforms: ~/.gpugo/state (or UserDir/state)
func (*Paths) UserDir ¶
UserDir returns the user-specific directory - Linux: ~/.gpugo - macOS: ~/.gpugo - Windows: %USERPROFILE%\.gpugo
func (*Paths) WithConfigDir ¶
WithConfigDir returns a new Paths with a custom config directory
func (*Paths) WithStateDir ¶
WithStateDir returns a new Paths with a custom state directory