We now set the target atom properly

This commit is contained in:
2023-03-28 01:00:54 -04:00
parent 01a0fc1bd3
commit 6f15ff3366
4 changed files with 40 additions and 7 deletions

View File

@@ -16,6 +16,16 @@ type Mime struct {
Type, Subtype string
}
// M is shorthand for creating a MIME type.
func M (ty, subtype string) Mime {
return Mime { ty, subtype }
}
// String returns the string representation of the MIME type.
func (mime Mime) String () string {
return mime.Type + "/" + mime.Subtype
}
var MimePlain = Mime { "text", "plain" }
var MimeFile = Mime { "text", "uri-list" }