You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
387 B
20 lines
387 B
2 years ago
|
// Code generated by gitoa.ru/go-4devs/mime and sourse {{.Source}}
|
||
|
package {{.ExtPackage}}
|
||
|
|
||
|
const (
|
||
|
{{- range $key, $value := .Extensions }}
|
||
|
{{ name $.ExtPrefix $key }} = "{{ $key }}"
|
||
|
{{- end}}
|
||
|
)
|
||
|
|
||
|
func Mime(name string) []string {
|
||
|
switch name {
|
||
|
{{- range $key, $value := .Extensions }}
|
||
|
case {{ name $.ExtPrefix $key }}:
|
||
|
return {{ value $value }}
|
||
|
{{- end}}
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|