package main import ( "database/sql" "fmt" ) type Area struct { Uid, Name, Flags, Color, Texture sql.NullString } type Room struct { Uid, Name, Building, Info, Notes, Flags sql.NullString Area Area AreaName sql.NullString Norecall, Noportal sql.NullInt64 Exits []Exit } func (r Room) String() string { return fmt.Sprintf("{Room:%q[%q]}", r.Name.String, r.Uid.String) } type Exit struct { Dir sql.NullString Fromuid, Touid sql.NullString Level int } type RoomExit struct { Room Exit } func (re RoomExit) String() string { return fmt.Sprintf("[%s(%s) |%s> %s]", re.Name.String, re.Uid.String, re.Dir.String, re.Touid.String) }