mirror of
https://github.com/foxcpp/maddy.git
synced 2025-04-07 06:57:37 +03:00
Now it is not tied go-imap-sql details (with the exception of special features), allowing it to be used with other storage backends that will be added in the future. --unsafe flag is removed and now maddyctl explicitly asks for confirmation in cases where transaction may be unsafe for connected clients. --yes flag disables that. In the future, maddy can be extended with IPC interface to push updates so it this restriction can be lifted altogether.
16 lines
309 B
Go
16 lines
309 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"runtime/debug"
|
|
)
|
|
|
|
func buildInfo() string {
|
|
if info, ok := debug.ReadBuildInfo(); ok {
|
|
if info.Main.Version == "(devel)" {
|
|
return "unknown (built from source tree)"
|
|
}
|
|
return fmt.Sprintf("%s %s", info.Main.Version, info.Main.Sum)
|
|
}
|
|
return "unknown (GOPATH build)"
|
|
}
|