><code>receive_logs.go</code>:&#x7684;&#x4EE3;&#x7801;&#xFF1A;</p>
<pre><code class="lang-go"><span class="hljs-keyword">package</span> main

<span class="hljs-keyword">import</span> (
        <span class="hljs-string">&quot;log&quot;</span>

        <span class="hljs-string">&quot;github.com/streadway/amqp&quot;</span>
)

<span class="hljs-keyword">func</span> failOnError(err error, msg <span class="hljs-keyword">string</span>) {
        <span class="hljs-keyword">if</span> err != <span class="hljs-literal