Files
smtp/identifiable.go
T

28 lines
641 B
Go
Raw Normal View History

package smtp
import "runtime/debug"
const modulePath = "code.nochebuena.dev/einherjar/smtp"
func (c *smtpClient) ModulePath() string { return modulePath }
func (c *smtpClient) ModuleVersion() string { return smtpModuleVersion() }
func (c *noopClient) ModulePath() string { return modulePath }
func (c *noopClient) ModuleVersion() string { return smtpModuleVersion() }
func smtpModuleVersion() 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)"
}