github.com/annwntech/go-micro/v2@v2.9.5/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  }