Dedup code.

This commit is contained in:
Sascha L. Teichmann
2016-04-23 21:09:23 +02:00
parent 0db9b519a6
commit 607b4de9ec
4 changed files with 14 additions and 21 deletions

View File

@ -7,7 +7,6 @@ package main
import (
"flag"
"fmt"
"image/color"
"log"
"net"
"net/http"
@ -83,12 +82,7 @@ func main() {
common.PrintVersionAndExit()
}
var bg color.RGBA
var err error
if bg, err = common.ParseColor(bgColor); err != nil {
log.Printf("WARN: Cannot parse background color '%s': %s\n", bgColor, err)
bg = common.BackgroundColor
}
bg := common.ParseColorDefault(bgColor, common.BackgroundColor)
router := mux.NewRouter()