Steve Thielemann 2 лет назад
Родитель
Сommit
1791d7147a
1 измененных файлов с 7 добавлено и 7 удалено
  1. 7 7
      door/door.go

+ 7 - 7
door/door.go

@@ -55,12 +55,12 @@ const MOUSE_DRAG_OFF = "\x1b[?1000l"
 
 // Move these into the door structure, instead of having globals.
 
-var Unicode bool           // Unicode support detected
-var CP437 bool             // CP437 support detected
-var Full_CP437 bool        // Full CP437 support detected (handles control codes properly)
-var Height int             // Screen height detected
-var Width int              // Screen width detected
-var Inactivity int64 = 120 // Inactivity timeout
+var Unicode bool                                                // Unicode support detected
+var CP437 bool                                                  // CP437 support detected
+var Full_CP437 bool                                             // Full CP437 support detected (handles control codes properly)
+var Height int                                                  // Screen height detected
+var Width int                                                   // Screen width detected
+var Inactivity time.Duration = time.Duration(120) * time.Second // Inactivity timeout
 
 type CursorPos struct {
 	X, Y int
@@ -244,7 +244,7 @@ func (d *Door) ReadDropfile(filename string) {
 		d.READFD = d.Config.Comm_handle
 		d.WRITEFD = d.Config.Comm_handle
 	} else {
-		log.Panic("Unsupported Comm type %d\n", d.Config.Comm_type)
+		log.Panicf("Unsupported Comm type %d\n", d.Config.Comm_type)
 	}
 
 	d.StartTime = time.Now()