github.com/viant/toolbox@v0.34.5/mime_type.go (about)

     1  package toolbox
     2  
     3  const (
     4  	//JSONMimeType JSON  mime type constant
     5  	JSONMimeType = "text/json"
     6  	//CSVMimeType csv  mime type constant
     7  	CSVMimeType = "text/csv"
     8  	//TSVMimeType tab separated mime type constant
     9  	TSVMimeType = "text/tsv"
    10  	//TextMimeType mime type constant
    11  	TextMimeType = "text/sql"
    12  )
    13  
    14  //FileExtensionMimeType json, csv, tsc, sql mime types.
    15  var FileExtensionMimeType = map[string]string{
    16  	"json": JSONMimeType,
    17  	"csv":  CSVMimeType,
    18  	"tsv":  TSVMimeType,
    19  	"sql":  TextMimeType,
    20  	"html": "text/html",
    21  	"js":   "text/javascript",
    22  	"jpg":  "image/jpeg",
    23  	"png":  "image/png",
    24  }