From 44c294287d42eb28f63a949cc26f530b076de52a Mon Sep 17 00:00:00 2001 From: James Mills Date: Thu, 22 Sep 2016 23:49:23 +1000 Subject: [PATCH] Shorten friendly type names --- gopher.go | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/gopher.go b/gopher.go index c8b5bb2..c52c4b4 100644 --- a/gopher.go +++ b/gopher.go @@ -106,43 +106,43 @@ func (it ItemType) MarshalJSON() ([]byte, error) { func (it ItemType) String() string { switch it { case FILE: - return "FILE" + return "TXT" case DIRECTORY: - return "DIRECTORY" + return "DIR" case PHONEBOOK: - return "PHONEBOOK" + return "PHO" case ERROR: - return "ERROR" + return "ERR" case BINHEX: - return "BINHEX" + return "HEX" case DOSARCHIVE: - return "DOSARCHIVE" + return "ARC" case UUENCODED: - return "UUENCODED" + return "UUE" case INDEXSEARCH: - return "INDEXSEARCH" + return "QRY" case TELNET: - return "TELNET" + return "TEL" case BINARY: - return "BINARY" + return "BIN" case REDUNDANT: - return "REDUNDANT" + return "DUP" case TN3270: - return "TN3270" + return "TN3" case GIF: return "GIF" case IMAGE: - return "IMAGE" + return "IMG" case INFO: - return "INFO" + return "NFO" case HTML: - return "HTML" + return "HTM" case AUDIO: - return "AUDIO" + return "SND" case PNG: return "PNG" default: - return "UNKNOWN" + return "???" } }