Files
worker/identifiable.go
T

22 lines
441 B
Go
Raw Normal View History

2026-05-29 15:46:49 +00:00
package worker
import "runtime/debug"
const modulePath = "code.nochebuena.dev/einherjar/worker"
func (w *workerImpl) ModulePath() string { return modulePath }
func (w *workerImpl) ModuleVersion() string {
if info, ok := debug.ReadBuildInfo(); ok {
for _, dep := range info.Deps {
if dep.Path == modulePath {
return dep.Version
}
}
if info.Main.Path == modulePath {
return info.Main.Version
}
}
return "(devel)"
}