()
| 87 | ) |
| 88 | |
| 89 | func BuildInfo() string { |
| 90 | version := Version |
| 91 | if info, ok := debug.ReadBuildInfo(); ok && info.Main.Version != "(devel)" { |
| 92 | version = info.Main.Version |
| 93 | } |
| 94 | |
| 95 | return fmt.Sprintf(`%s %s/%s %s |
| 96 | |
| 97 | default config: %s |
| 98 | default state_dir: %s |
| 99 | default runtime_dir: %s`, |
| 100 | version, runtime.GOOS, runtime.GOARCH, runtime.Version(), |
| 101 | filepath.Join(ConfigDirectory, "maddy.conf"), |
| 102 | DefaultStateDirectory, |
| 103 | DefaultRuntimeDirectory) |
| 104 | } |
| 105 | |
| 106 | func init() { |
| 107 | maddycli.AddGlobalFlag( |