mirror of
https://github.com/nonoo/kappanhang.git
synced 2025-12-06 08:02:00 +01:00
Reformat first log line
This commit is contained in:
parent
dfe09051e2
commit
ab104edc8d
2
args.go
2
args.go
|
|
@ -1,6 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/pborman/getopt"
|
||||
|
|
@ -19,6 +20,7 @@ func parseArgs() {
|
|||
getopt.Parse()
|
||||
|
||||
if *h || *a == "" {
|
||||
fmt.Println(getAboutStr())
|
||||
getopt.Usage()
|
||||
os.Exit(1)
|
||||
}
|
||||
|
|
|
|||
7
main.go
7
main.go
|
|
@ -1,7 +1,6 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"os/signal"
|
||||
"strings"
|
||||
|
|
@ -13,6 +12,10 @@ import (
|
|||
|
||||
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) {
|
||||
// Depleting gotErrChan.
|
||||
var finished bool
|
||||
|
|
@ -73,9 +76,9 @@ func reportError(err error) {
|
|||
}
|
||||
|
||||
func main() {
|
||||
fmt.Println("kappanhang by Norbert Varga HA2NON and Akos Marton ES1AKOS https://github.com/nonoo/kappanhang")
|
||||
parseArgs()
|
||||
log.Init()
|
||||
log.Print(getAboutStr())
|
||||
|
||||
osSignal := make(chan os.Signal, 1)
|
||||
signal.Notify(osSignal, os.Interrupt, syscall.SIGTERM)
|
||||
|
|
|
|||
Loading…
Reference in a new issue