Native support for iOS dirs; bind SSH dir to variable

This commit is contained in:
2026-02-07 15:05:15 -05:00
parent ec9c6b5062
commit d7242fee96
5 changed files with 33 additions and 4 deletions
+27
View File
@@ -0,0 +1,27 @@
//go:build ios
package global
import (
"path/filepath"
"github.com/rwinkhart/go-boilerplate/back"
)
func init() {
// get the app's Library/Application Support directory (private, not backed up by iCloud)
back.Home = filepath.Join(back.Home, "Library", "Application Support", "libmutton-ios")
}
var (
EntryRoot = back.Home + "/entries" // Path to libmutton entry directory
CfgDir = back.Home + "/config" // Path to libmutton configuration directory
CfgPath = CfgDir + "/libmuttoncfg.json" // Path to libmutton configuration file
AgeDir = CfgDir + "/age" // Path to libmutton password age directory
SSHDir = back.Home + "/ssh" // Path to SSH directory
)
const (
PathSeparator = "/" // Platform-specific path separator
IsWindows = false // Platform indicator
)
+2 -1
View File
@@ -1,4 +1,4 @@
//go:build !windows
//go:build !windows && !ios && !android
package global
@@ -9,6 +9,7 @@ var (
CfgDir = back.Home + "/.config/libmutton" // Path to libmutton configuration directory
CfgPath = CfgDir + "/libmuttoncfg.json" // Path to libmutton configuration file
AgeDir = CfgDir + "/age" // Path to libmutton password age directory
SSHDir = back.Home + "/.ssh" // Path to SSH directory
)
const (
+1
View File
@@ -9,6 +9,7 @@ var (
CfgDir = back.Home + "\\AppData\\Local\\libmutton\\config" // Path to libmutton configuration directory
CfgPath = CfgDir + "\\libmuttoncfg.json" // Path to libmutton configuration file
AgeDir = CfgDir + "\\age" // Path to libmutton password age directory
SSHDir = back.Home + "\\.ssh" // Path to SSH directory
)
const (