ss/contents/main.go

26 lines
417 B
Go
Raw Normal View History

package contents
2024-01-10 18:23:02 +03:00
import (
)
2024-01-10 18:23:02 +03:00
type CharSet string
const (
Utf8 = "utf-8"
)
2024-01-10 18:23:02 +03:00
type Type string
const (
// Using the UTF-8 by default.
Unknown Type = "application/octet-stream"
2024-01-10 18:23:02 +03:00
Binary
Plain Type = "text/plain"
Css Type = "text/css"
Html Type = "text/html"
Json Type = "application/json"
2024-01-10 18:23:02 +03:00
UrlEncoded = "application/x-www-form-urlencoded"
)
2024-01-10 18:23:02 +03:00
func (t Type) CharSet(set CharSet) Type {
return t + ";" + Type(set)
}