title: How to specify the file location for `template.ParseFiles` in Go Language?
body: <p>After I watched <a href="https://youtu.be/94HtrWMdr74?list=PLnSATAFQN94BDYCCB2hylDN6qwMjCfwxG" rel="noreferrer">this video</a>, I try it myself. However, I get the panic error <code>panic: open templates/index.html: The system cannot find the path specified.</code> The Complete erroe message is like the following.</p>
  
  <pre><code>Hello, Go Web Development 1.3
  panic: open templates/index.html: The system cannot find the path specified.
  
  goroutine 1 [running]:
  panic(0x789260, 0xc082054e40)
      F:/Go/src/runtime/panic.go:481 +0x3f4
  html/template.Must(0x0, 0xe34538, 0xc082054e40, 0x0)
      F:/Go/src/html/template/template.go:340 +0x52
  main.main()
      E:/Users/User/Desktop/codespace/go_workspace/src/go-for-web-dev/src/1.3_UsingTemplate.go:11 +0x20d
  </code></pre>
  
  <p>I have tried different string like <code>"templates/index.html"</code>, <code>"index.html"</code>, <code>"./template/index.html"</code>... Also, I try to copy the entire template folder into <code>pkg</code>, <code>bin</code>...But I get the same error message.</p>
  
  <p>The following is the go program (1.3_UsingTemplate.go).</p>
  
  <pre><code>package src
  
  import (
      "fmt"
      "net/http"
      "html/template"
  )
  
  func main() {
      fmt.Println("Hello, Go Web Development 1.3")
      templates := template.Must(template.ParseFiles("templates/index.html"))  //This line should have some problem
  
      http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
          if err := templates.ExecuteTemplate(w, "index.html", nil); err != nil {
              http.Error(w, err.Error(), http.StatusInternalServerError)
          }
      })
  
      fmt.Println(http.ListenAndServe(":8080",nil))
  }
  </code></pre>
  
  <p>File Structure</p>
  
  <p><a href="https://i.stack.imgur.com/6GPSO.png" rel="noreferrer"><img src="https://i.stack.imgur.com/6GPSO.png" alt="enter image description here"></a></p>
  
  <hr>
  
  <h2>Update</h2>
  
  <p>To solve this problem, I need to first change the current working directory to the folder containing the *.go file. Then, execute <code>go run {filename.go}</code>. In GoClipse, is there any setting can be set to the <code>Run Configurations</code> for automatically changing the current working directory to the folder containing the *.go file?</p>