mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2025-07-13 21:40:31 +02:00
Dedup code.
This commit is contained in:
@ -8,7 +8,6 @@ import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"image"
|
||||
"image/color"
|
||||
"log"
|
||||
"os"
|
||||
"runtime/pprof"
|
||||
@ -65,12 +64,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)
|
||||
|
||||
if cpuProfile != "" {
|
||||
f, err := os.Create(cpuProfile)
|
||||
@ -82,6 +76,7 @@ func main() {
|
||||
}
|
||||
|
||||
var colors *common.Colors
|
||||
var err error
|
||||
if colors, err = common.ParseColors(colorsfile); err != nil {
|
||||
log.Fatalf("Cannot open color file: %s", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user