1
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
421 B
Go

package history
import (
"os"
"path/filepath"
)
const historyFile = ".fluidb_history"
// Path returns the full path to the history file.
func Path() (string, error) {
hdir, err := os.UserHomeDir()
if err != nil {
return "", err
}
return filepath.Join(hdir, historyFile), nil
}
// Delete deletes the history file.
func Delete() error {
p, err := Path()
if err != nil {
return err
}
return os.Remove(p)
}