test_util.go 284 B

123456789101112131415161718
  1. package common
  2. // errstring returns the string representation of an error.
  3. func Errstring(err error) string {
  4. if err != nil {
  5. return err.Error()
  6. }
  7. return ""
  8. }
  9. func GetDbDir() string {
  10. InitConf()
  11. dbDir, err := GetDataLoc()
  12. if err != nil {
  13. Log.Fatal(err)
  14. }
  15. return dbDir
  16. }