title: undefined kafka components for Go kafka
body: <p>I was trying to install one of my go files. But I bumped into this error</p>
  <pre><code>C:\mygoproject&gt;go install kafkapublisher.go
  
  \#command-line-arguments
  .\kafkapublisher.go:8:65: undefined: kafka.Message
  
  .\kafkapublisher.go:10:19: undefined: kafka.NewProducer
  
  .\kafkapublisher.go:10:38: undefined: kafka.ConfigMap
  
  .\kafkapublisher.go:17:31: undefined: kafka.Event
  
  .\kafkapublisher.go:19:26: undefined: kafka.Message
  </code></pre>
  <p>On my kafkapublisher.go file, I already imported the kafka dependency:</p>
  <pre><code>    import (
          &quot;github.com/confluentinc/confluent-kafka-go/kafka&quot;
          &quot;log&quot;
      )
  </code></pre>
  <p>even on my <code>go.mod</code> file</p>
  <pre><code>    module mymodule
      
      go 1.12
      
      require (
          github.com/aws/aws-lambda-go v1.15.0
          github.com/confluentinc/confluent-kafka-go v1.3.0
      )
  </code></pre>
  <p>I followed this documentation: <a href="https://docs.confluent.io/current/clients/go.html" rel="nofollow noreferrer">https://docs.confluent.io/current/clients/go.html</a></p>
  <p><a href="https://i.stack.imgur.com/2SXEP.png" rel="nofollow noreferrer">screenshot</a></p>