1
0
mirror of https://github.com/axllent/mailpit.git synced 2024-12-30 23:17:59 +02:00
mailpit/main.go

25 lines
353 B
Go
Raw Normal View History

2022-07-29 13:23:08 +02:00
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()
}
}