github.com/neugram/ng@v0.0.0-20180309130942-d472ff93d872/eval/testdata/http1.ng (about)

     1  import "net/http" // uses plugins to load
     2  
     3  // Type http.Dir is a string with a method. Test conversions.
     4  dir := http.Dir("/constant")
     5  str := "/variable"
     6  dir = http.Dir(str)
     7  
     8  _, err := dir.Open("/non-exist")
     9  
    10  import "os"
    11  
    12  if os.IsNotExist(err) {
    13  	print("OK")
    14  }