utils.go 151 B

1234567891011
  1. package autostruct
  2. import (
  3. "errors"
  4. "os"
  5. )
  6. func FileExists(path string) bool {
  7. _, err := os.Stat(path)
  8. return !errors.Is(err, os.ErrNotExist)
  9. }