DefaultPath returns the canonical SQLite database path.
()
| 25 | |
| 26 | // DefaultPath returns the canonical SQLite database path. |
| 27 | func DefaultPath() string { |
| 28 | if path := os.Getenv("CAM_DB_PATH"); path != "" { |
| 29 | return path |
| 30 | } |
| 31 | return filepath.Join(pathutil.ConfigDir(), "cam.db") |
| 32 | } |
| 33 | |
| 34 | // New returns a Store using path, or DefaultPath when path is empty. |
| 35 | func New(path string) Store { |