2016-12-28 2 views
-1

템플릿 패키지에서 템플릿을 구문 분석하는 라이브러리를 작성 중입니다. 샘플 응용 프로그램 내에서 해당 응용 프로그램을 사용할 때 자체 디렉토리에서 템플리트를 읽지 만 libary의 코드는 실패합니다. 여기 제 3 자 라이브러리에서 Golang 구문 분석 템플릿

은 libary이다 - https://github.com/bangarharshit/bigpipe-golang 나는이 라인에 직면 문제입니다 - https://github.com/bangarharshit/bigpipe-golang/blob/master/Application.go#L66

복사 코드 LIB에서 -

templates, err := template.ParseFiles("templates/bigpipe.html") 
if err != nil { 
    return 
} 

답변

0

하나의 대안 soultion 변수 사용으로 파일의 내용을 복사하는 것입니다 template.parsefiles 대신 template.parse