Only pass Fun value to Type{} if it has an actual effect

This commit is contained in:
Seednode 2023-10-19 09:44:41 -05:00
parent 8dcd03e07f
commit 9274162b4b
6 changed files with 9 additions and 17 deletions

View File

@ -12,7 +12,7 @@ import (
)
const (
ReleaseVersion string = "3.0.1"
ReleaseVersion string = "3.0.2"
)
var (

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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