Initial scaffold: project structure, .gitignore, go.mod
This commit is contained in:
20
internal/config/paths_darwin.go
Normal file
20
internal/config/paths_darwin.go
Normal file
@@ -0,0 +1,20 @@
|
||||
//go:build darwin
|
||||
|
||||
package config
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
// ConfigDir returns ~/Library/Application Support/syncwarden.
|
||||
func ConfigDir() string {
|
||||
home, _ := os.UserHomeDir()
|
||||
return filepath.Join(home, "Library", "Application Support", "syncwarden")
|
||||
}
|
||||
|
||||
// SyncthingConfigPath returns the default Syncthing config.xml path on macOS.
|
||||
func SyncthingConfigPath() string {
|
||||
home, _ := os.UserHomeDir()
|
||||
return filepath.Join(home, "Library", "Application Support", "Syncthing", "config.xml")
|
||||
}
|
||||
Reference in New Issue
Block a user