<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>SSR on philipjkim</title><link>https://philipjkim.cc/tags/ssr/</link><description>Recent content in SSR on philipjkim</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Sat, 07 Mar 2026 00:01:56 +0900</lastBuildDate><atom:link href="https://philipjkim.cc/tags/ssr/index.xml" rel="self" type="application/rss+xml"/><item><title>HTMX와 함께 사용할 Go 템플릿 기술 비교: html/template vs. Templ</title><link>https://philipjkim.cc/posts/20260307-go-html-template-vs-templ-with-htmx/</link><pubDate>Sat, 07 Mar 2026 00:01:56 +0900</pubDate><guid>https://philipjkim.cc/posts/20260307-go-html-template-vs-templ-with-htmx/</guid><description>&lt;p&gt;&lt;em&gt;이 글은 Claude Opus 4.6 을 이용해 초안이 작성되었으며, 이후 퇴고를 거쳤습니다.&lt;/em&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Go로 SSR 웹 앱을 만들 때 HTMX와 함께 사용할 템플릿 기술로 두 가지 선택지가 있습니다.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Go 표준 &lt;code&gt;html/template&lt;/code&gt; + 커스텀 PageRenderer (페이지별 독립 템플릿 세트)&lt;/li&gt;
&lt;li&gt;Templ&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;이 글에서는 두 방식의 장단점을 실무 관점에서 비교합니다.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="타입-안전성"&gt;타입 안전성&lt;/h2&gt;
&lt;p&gt;가장 큰 갈림길입니다.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;html/template&lt;/code&gt;은 런타임에 템플릿을 파싱하고 데이터를 바인딩합니다. &lt;code&gt;{{ .Titl }}&lt;/code&gt;이라고 써도 빌드는 통과합니다. 런타임에 빈 문자열이 나오거나 에러가 발생하고 나서야 문제를 알 수 있습니다.&lt;/p&gt;</description></item></channel></rss>