Other: Single instance

This commit is contained in:
James Houlahan
2022-10-12 23:30:43 +02:00
parent fd63611b41
commit 593d86f3a7
16 changed files with 470 additions and 73 deletions

View File

@ -51,7 +51,12 @@ func New(provider Provider, configName string) *Locations {
}
}
// GetGuiLockFile returns the path to the lock file (e.g. ~/.cache/<company>/<app>/<app>.lock).
// GetLockFile returns the path to the bridge lock file (e.g. ~/.cache/<company>/<app>/<app>.lock).
func (l *Locations) GetLockFile() string {
return filepath.Join(l.userCache, l.configName+".lock")
}
// GetGuiLockFile returns the path to the GUI lock file (e.g. ~/.cache/<company>/<app>/<app>.lock).
func (l *Locations) GetGuiLockFile() string {
return filepath.Join(l.userCache, l.configGuiName+".lock")
}