Reformat first log line

This commit is contained in:
Nonoo 2020-10-26 08:39:12 +01:00
parent dfe09051e2
commit ab104edc8d
2 changed files with 7 additions and 2 deletions

View file

@ -1,6 +1,7 @@
package main package main
import ( import (
"fmt"
"os" "os"
"github.com/pborman/getopt" "github.com/pborman/getopt"
@ -19,6 +20,7 @@ func parseArgs() {
getopt.Parse() getopt.Parse()
if *h || *a == "" { if *h || *a == "" {
fmt.Println(getAboutStr())
getopt.Usage() getopt.Usage()
os.Exit(1) os.Exit(1)
} }

View file

@ -1,7 +1,6 @@
package main package main
import ( import (
"fmt"
"os" "os"
"os/signal" "os/signal"
"strings" "strings"
@ -13,6 +12,10 @@ import (
var gotErrChan = make(chan bool) var gotErrChan = make(chan bool)
func getAboutStr() string {
return "kappanhang by Norbert Varga HA2NON and Akos Marton ES1AKOS https://github.com/nonoo/kappanhang"
}
func runControlStream(osSignal chan os.Signal) (shouldExit bool, exitCode int) { func runControlStream(osSignal chan os.Signal) (shouldExit bool, exitCode int) {
// Depleting gotErrChan. // Depleting gotErrChan.
var finished bool var finished bool
@ -73,9 +76,9 @@ func reportError(err error) {
} }
func main() { func main() {
fmt.Println("kappanhang by Norbert Varga HA2NON and Akos Marton ES1AKOS https://github.com/nonoo/kappanhang")
parseArgs() parseArgs()
log.Init() log.Init()
log.Print(getAboutStr())
osSignal := make(chan os.Signal, 1) osSignal := make(chan os.Signal, 1)
signal.Notify(osSignal, os.Interrupt, syscall.SIGTERM) signal.Notify(osSignal, os.Interrupt, syscall.SIGTERM)