MCPcopy Create free account
hub / github.com/diillson/chatcli / gatewayStatePath

Function gatewayStatePath

cli/gateway_command.go:728–734  ·  view source on GitHub ↗

── daemon state helpers ─────────────────────────────────────── gatewayStatePath returns ~/.chatcli/ , falling back to the temp dir.

(name string)

Source from the content-addressed store, hash-verified

726
727// gatewayStatePath returns ~/.chatcli/<name>, falling back to the temp dir.
728func gatewayStatePath(name string) string {
729 home, err := os.UserHomeDir()
730 if err != nil {
731 return filepath.Join(os.TempDir(), name)
732 }
733 return filepath.Join(home, ".chatcli", name)
734}
735
736// gatewayRunningPID returns the daemon PID if the pidfile points at a live
737// process, clearing a stale pidfile otherwise.

Callers 8

gatewayStartDetachedMethod · 0.85
gatewayStopMethod · 0.85
teeLoggerToGatewayLogMethod · 0.85
gatewayRunningPIDFunction · 0.85
TestGatewayRunningPIDFunction · 0.85
runtimeModelStatePathFunction · 0.85
TestGatewayStopRunningFunction · 0.85

Calls

no outgoing calls

Tested by 3

TestGatewayRunningPIDFunction · 0.68
TestGatewayStopRunningFunction · 0.68