gitee.com/liuxuezhan/go-micro-v1.18.0@v1.0.0/util/file/file_test.go (about) 1 package file 2 3 import ( 4 "testing" 5 ) 6 7 func TestExists(t *testing.T) { 8 ok, err := Exists("/") 9 10 if ok { 11 return 12 } 13 14 if !ok || err != nil { 15 t.Fatalf("Test Exists fail, %s", err) 16 } 17 }