Only pass Fun value to Type{} if it has an actual effect
This commit is contained in:
parent
8dcd03e07f
commit
9274162b4b
|
@ -12,7 +12,7 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
ReleaseVersion string = "3.0.1"
|
||||
ReleaseVersion string = "3.0.2"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -434,7 +434,7 @@ func ServePage(args []string) error {
|
|||
formats := make(types.Types)
|
||||
|
||||
if Audio || All {
|
||||
formats.Add(audio.Format{Fun: Fun})
|
||||
formats.Add(audio.Format{})
|
||||
}
|
||||
|
||||
if Code || All {
|
||||
|
@ -442,15 +442,15 @@ func ServePage(args []string) error {
|
|||
}
|
||||
|
||||
if Flash || All {
|
||||
formats.Add(flash.Format{Fun: Fun})
|
||||
formats.Add(flash.Format{})
|
||||
}
|
||||
|
||||
if Text || All {
|
||||
formats.Add(text.Format{Fun: Fun})
|
||||
formats.Add(text.Format{})
|
||||
}
|
||||
|
||||
if Videos || All {
|
||||
formats.Add(video.Format{Fun: Fun})
|
||||
formats.Add(video.Format{})
|
||||
}
|
||||
|
||||
// enable image support if no other flags are passed, to retain backwards compatibility
|
||||
|
|
|
@ -11,9 +11,7 @@ import (
|
|||
"seedno.de/seednode/roulette/types"
|
||||
)
|
||||
|
||||
type Format struct {
|
||||
Fun bool
|
||||
}
|
||||
type Format struct {}
|
||||
|
||||
func (t Format) Css() string {
|
||||
var css strings.Builder
|
||||
|
|
|
@ -11,9 +11,7 @@ import (
|
|||
"seedno.de/seednode/roulette/types"
|
||||
)
|
||||
|
||||
type Format struct {
|
||||
Fun bool
|
||||
}
|
||||
type Format struct {}
|
||||
|
||||
func (t Format) Css() string {
|
||||
var css strings.Builder
|
||||
|
|
|
@ -14,9 +14,7 @@ import (
|
|||
"seedno.de/seednode/roulette/types"
|
||||
)
|
||||
|
||||
type Format struct {
|
||||
Fun bool
|
||||
}
|
||||
type Format struct {}
|
||||
|
||||
func (t Format) Css() string {
|
||||
var css strings.Builder
|
||||
|
|
|
@ -12,9 +12,7 @@ import (
|
|||
"seedno.de/seednode/roulette/types"
|
||||
)
|
||||
|
||||
type Format struct {
|
||||
Fun bool
|
||||
}
|
||||
type Format struct {}
|
||||
|
||||
func (t Format) Css() string {
|
||||
var css strings.Builder
|
||||
|
|
Loading…
Reference in New Issue