Remove unused Name value from SupportedFormat structs
This commit is contained in:
parent
c996f3fc53
commit
d18dc9a41c
|
@ -12,7 +12,7 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
ReleaseVersion string = "0.70.1"
|
||||
ReleaseVersion string = "0.70.2"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -10,7 +10,6 @@ import (
|
|||
|
||||
func RegisterAudioFormats() *SupportedFormat {
|
||||
return &SupportedFormat{
|
||||
Name: "audio",
|
||||
Css: ``,
|
||||
Title: func(queryParams, fileUri, filePath, fileName, mime string) string {
|
||||
return fmt.Sprintf(`<title>%s</title>`, fileName)
|
||||
|
|
|
@ -11,7 +11,6 @@ import (
|
|||
|
||||
func RegisterFlashFormats() *SupportedFormat {
|
||||
return &SupportedFormat{
|
||||
Name: `flash`,
|
||||
Css: ``,
|
||||
Title: func(queryParams, fileUri, filePath, fileName, mime string) string {
|
||||
return fmt.Sprintf(`<title>%s</title>`, fileName)
|
||||
|
|
|
@ -24,7 +24,6 @@ type Dimensions struct {
|
|||
|
||||
func RegisterImageFormats() *SupportedFormat {
|
||||
return &SupportedFormat{
|
||||
Name: "images",
|
||||
Css: ``,
|
||||
Title: func(queryParams, fileUri, filePath, fileName, mime string) string {
|
||||
dimensions, err := ImageDimensions(filePath)
|
||||
|
|
|
@ -13,8 +13,7 @@ import (
|
|||
|
||||
func RegisterTextFormats() *SupportedFormat {
|
||||
return &SupportedFormat{
|
||||
Name: "text",
|
||||
Css: `pre{margin:.5rem;}`,
|
||||
Css: `pre{margin:.5rem;}`,
|
||||
Title: func(queryParams, fileUri, filePath, fileName, mime string) string {
|
||||
return fmt.Sprintf(`<title>%s</title>`, fileName)
|
||||
},
|
||||
|
|
|
@ -12,7 +12,6 @@ import (
|
|||
)
|
||||
|
||||
type SupportedFormat struct {
|
||||
Name string
|
||||
Css string
|
||||
Title func(queryParams, fileUri, filePath, fileName, mime string) string
|
||||
Body func(queryParams, fileUri, filePath, fileName, mime string) string
|
||||
|
@ -21,8 +20,6 @@ type SupportedFormat struct {
|
|||
Validate func(filePath string) bool
|
||||
}
|
||||
|
||||
// func (s *SupportedFormat) ListExtensions() []string
|
||||
|
||||
type SupportedFormats struct {
|
||||
Extensions map[string]*SupportedFormat
|
||||
MimeTypes map[string]*SupportedFormat
|
||||
|
|
|
@ -10,8 +10,7 @@ import (
|
|||
|
||||
func RegisterVideoFormats() *SupportedFormat {
|
||||
return &SupportedFormat{
|
||||
Name: "video",
|
||||
Css: ``,
|
||||
Css: ``,
|
||||
Title: func(queryParams, fileUri, filePath, fileName, mime string) string {
|
||||
return fmt.Sprintf(`<title>%s</title>`, fileName)
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue