title: PromQL Module Missing
body: <p>I am trying to use the promql package <a href="https://pkg.go.dev/github.com/prometheus/prometheus/promql/parser#ParseExpr" rel="nofollow noreferrer">here</a></p>
  <pre><code>package main
  
  import (
      &quot;fmt&quot;    
      &quot;github.com/prometheus/prometheus/promql/parser&quot;
  )
  
  func main() {
      fmt.Println(&quot;Hello&quot;)
      parser.ParseExpr(&quot;foobar&quot;)    
  }
  </code></pre>
  <p>Having trouble importing. This is the error:</p>
  <blockquote>
  <p>no required module provides package
  github.com/prometheus/prometheus/promql/parser; to add it:
  go get github.com/prometheus/prometheus/promql/parser (compile)</p>
  </blockquote>
  <p>I tried to run <code>go get github.com/prometheus/prometheus/promql/parser</code> as suggested but it fails.</p>
  <blockquote>
  <p>go get: module github.com/prometheus/prometheus@upgrade found
  (v2.5.0+incompatible), but does not contain package
  github.com/prometheus/prometheus/promql/parser</p>
  </blockquote>
  <p>Here is my <code>go.mod</code> currently:</p>
  <pre><code>module foo.com/bar/parser
  
  go 1.17
  
  require github.com/prometheus/prometheus v2.5.0+incompatible // indirect
  </code></pre>