Navigation Menu

Skip to content

Commit

Permalink
fix: trim newlines when rendering flag values
Browse files Browse the repository at this point in the history
so the default genre split doesn't break the table
  • Loading branch information
sentriz committed May 11, 2021
1 parent d2c9136 commit 4637cf7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/gonic/gonic.go
Expand Up @@ -9,6 +9,7 @@ import (
"os"
"path"
"regexp"
"strings"
"time"

_ "github.com/jinzhu/gorm/dialects/sqlite"
Expand Down Expand Up @@ -57,7 +58,8 @@ func main() {
log.Printf("starting gonic %s\n", gonic.Version)
log.Printf("provided config\n")
set.VisitAll(func(f *flag.Flag) {
log.Printf(" %-15s %s\n", f.Name, f.Value)
value := strings.ReplaceAll(f.Value.String(), "\n", "")
log.Printf(" %-15s %s\n", f.Name, value)
})

if _, err := os.Stat(*confMusicPath); os.IsNotExist(err) {
Expand Down

0 comments on commit 4637cf7

Please sign in to comment.