INNER CODE UNIT · Go

main

GoMudEngine/GoMud · main.go:83

func main() {

	// Dispatch the module manager subcommand before any server initialisation.
	if len(os.Args) >= 2 && os.Args[1] == "module" {
		modmanager.Run(os.Args[2:])
		return
	}

	serverStartTime := time.Now()

	// Capture panic and write msg/stack to logs
	defer func() {
		if r := recover(); r != nil {
			mudlog.Error("PANIC", "error", r)
			s := string(debug.Stack())
			for _, str := range strings.Split(s, "\n") {
				mudlog.Error("PANIC", "stack", str)
			}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…