main.go 457 B

1234567891011121314151617181920212223242526272829
  1. package contents
  2. type Option interface {
  3. KeyValue() [2]string
  4. }
  5. type CharSet string
  6. const (
  7. Utf8 CharSet = "utf-8"
  8. )
  9. func (cs CharSet) KeyValue() [2]string {
  10. return [2]string{
  11. "charset",
  12. string(cs),
  13. }
  14. }
  15. type Type string
  16. const (
  17. // Using the UTF-8 by default.
  18. Unknown Type = "application/octet-stream"
  19. Binary
  20. Plain= "text/plain"
  21. Css= "text/css"
  22. Html= "text/html"
  23. Json= "application/json"
  24. UrlEncoded= "application/x-www-form-urlencoded"
  25. )