mirror of
https://github.com/hazemKrimi/crimson-vault.git
synced 2026-05-01 18:20:27 +00:00
chore: setup some defaults
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
package lib
|
||||
|
||||
const DEFAULT_PORT int = 6900
|
||||
const DEFAULT_CONFIG_DIRECTORY string = ".local/state/crimson-vault"
|
||||
@@ -0,0 +1,18 @@
|
||||
package lib
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
func GetConfigDirectory() (string, error) {
|
||||
home, err := os.UserHomeDir()
|
||||
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
config, err := filepath.Abs(filepath.Join(home, DEFAULT_CONFIG_DIRECTORY))
|
||||
|
||||
return config, nil
|
||||
}
|
||||
Reference in New Issue
Block a user