1
0
mirror of https://github.com/axllent/mailpit.git synced 2024-12-28 23:06:43 +02:00
mailpit/main.go
2022-07-29 23:23:08 +12:00

25 lines
353 B
Go

package main
import (
"os"
"path/filepath"
"github.com/axllent/mailpit/cmd"
sendmail "github.com/axllent/mailpit/sendmail/cmd"
)
func main() {
exec, err := os.Executable()
if err != nil {
panic(err)
}
// running directly
if filepath.Base(exec) == filepath.Base(os.Args[0]) {
cmd.Execute()
} else {
// symlinked
sendmail.Run()
}
}