<hr/>**评论:**<br/><br/>Glats: <pre><p>I recommend you <a href="https://echo.labstack.com/" rel="nofollow">https://echo.labstack.com/</a></p></pre>keviswang: <pre><p>echo is great, how to connect with mysql, write raw sql query?</p></pre>titpetric: <pre><p>You should use <a href="https://github.com/jmoiron/sqlx" rel="nofollow">sqlx</a> for that.</p>
<p>This would be a <a href="https://github.com/titpetric/books/blob/master/api-foundations/chapter6b/main_sqlx.go" rel="nofollow">short example of using sqlx to query a mysql database</a> from my book <a href="https://leanpub.com/api-foundations" rel="nofollow">API Foundations in Go</a>. You can check other samples from the book in the github repo.</p></pre>twek: <pre><blockquote>
<p><a href="https://echo.labstack.com/" rel="nofollow">https://echo.labstack.com/</a></p>
</blockquote>
<p>Does it not bug you the router doesn't use http.HandlerFunc?</p></pre>keviswang: <pre><p>I am new to golang, wonder how to program api in golang with myql. I have seen some small sample, but maybe not useful in practice.</p></pre>
