blob: 590329ef84ece706f51764758b1fc0cb5c319176 [file] [log] [blame]
package sarama
import "runtime/debug"
var v string
func version() string {
if v == "" {
bi, ok := debug.ReadBuildInfo()
if ok {
v = bi.Main.Version
} else {
// if we can't read a go module version then they're using a git
// clone or vendored module so all we can do is report "dev" for
// the version
v = "dev"
}
}
return v
}