Split into separate packages

This commit is contained in:
2024-02-26 16:58:39 -05:00
parent b26a29dd3d
commit e61beb3f94
13 changed files with 78 additions and 59 deletions
+10
View File
@@ -0,0 +1,10 @@
package offline
import (
"os"
)
// global variables used across multiple files
var (
home, _ = os.UserHomeDir()
)
+12
View File
@@ -0,0 +1,12 @@
//go:build !windows
package offline
// EntryRoot path to libmutton entry directory
var EntryRoot = home + "/.local/share/libmutton"
// exported constants
const (
PathSeparator = "/"
Windows = false
)
+12
View File
@@ -0,0 +1,12 @@
//go:build windows
package offline
// EntryRoot path to libmutton entry directory
var EntryRoot = home + "\\AppData\\Local\\libmutton\\entries"
// exported constants
const (
PathSeparator = "\\"
Windows = true
)