Here is my previous post Golang template.ParseFiles "not a directory" error. I have snippet:
root_path, err := osext.Executable()
if err != nil {
return err
}
templates_path := root_path + "/app/views/mailtemplates/" + "feedback"
text_path := templates_path + ".txt"
textTmpl, err := template.ParseFiles(text_path)
if err != nil {
return err
}
and next error:
open /home/cnaize/gocode/bin/advorts/app/views/mailtemplates/feedback.txt: not a directory
If I hardcode to:
templates_path := "/home/cnaize/" + "feedback"
everything is ok. Where is the problem? I've tried to remove my bin, but it didn't help.
EDITED:
My env variables
:
export GOROOT="/usr/local/go"
export GOPATH=$HOME/gocode
export PATH=$PATH:$GOROOT/bin
export PATH="$PATH:$GOPATH/bin"
and my PATH
variable:
PATH=/home/cnaize/.rvm/gems/ruby-2.1.0/bin:/home/cnaize/.rvm/gems/ruby-2.1.0@global/bin:/home/cnaize/.rvm/rubies/ruby-2.1.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/cnaize/.rvm/bin:/usr/local/go/bin:/home/cnaize/gocode/bin