Shorten friendly type names
This commit is contained in:
parent
b206825c57
commit
44c294287d
34
gopher.go
34
gopher.go
@ -106,43 +106,43 @@ func (it ItemType) MarshalJSON() ([]byte, error) {
|
|||||||
func (it ItemType) String() string {
|
func (it ItemType) String() string {
|
||||||
switch it {
|
switch it {
|
||||||
case FILE:
|
case FILE:
|
||||||
return "FILE"
|
return "TXT"
|
||||||
case DIRECTORY:
|
case DIRECTORY:
|
||||||
return "DIRECTORY"
|
return "DIR"
|
||||||
case PHONEBOOK:
|
case PHONEBOOK:
|
||||||
return "PHONEBOOK"
|
return "PHO"
|
||||||
case ERROR:
|
case ERROR:
|
||||||
return "ERROR"
|
return "ERR"
|
||||||
case BINHEX:
|
case BINHEX:
|
||||||
return "BINHEX"
|
return "HEX"
|
||||||
case DOSARCHIVE:
|
case DOSARCHIVE:
|
||||||
return "DOSARCHIVE"
|
return "ARC"
|
||||||
case UUENCODED:
|
case UUENCODED:
|
||||||
return "UUENCODED"
|
return "UUE"
|
||||||
case INDEXSEARCH:
|
case INDEXSEARCH:
|
||||||
return "INDEXSEARCH"
|
return "QRY"
|
||||||
case TELNET:
|
case TELNET:
|
||||||
return "TELNET"
|
return "TEL"
|
||||||
case BINARY:
|
case BINARY:
|
||||||
return "BINARY"
|
return "BIN"
|
||||||
case REDUNDANT:
|
case REDUNDANT:
|
||||||
return "REDUNDANT"
|
return "DUP"
|
||||||
case TN3270:
|
case TN3270:
|
||||||
return "TN3270"
|
return "TN3"
|
||||||
case GIF:
|
case GIF:
|
||||||
return "GIF"
|
return "GIF"
|
||||||
case IMAGE:
|
case IMAGE:
|
||||||
return "IMAGE"
|
return "IMG"
|
||||||
case INFO:
|
case INFO:
|
||||||
return "INFO"
|
return "NFO"
|
||||||
case HTML:
|
case HTML:
|
||||||
return "HTML"
|
return "HTM"
|
||||||
case AUDIO:
|
case AUDIO:
|
||||||
return "AUDIO"
|
return "SND"
|
||||||
case PNG:
|
case PNG:
|
||||||
return "PNG"
|
return "PNG"
|
||||||
default:
|
default:
|
||||||
return "UNKNOWN"
|
return "???"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user