/******************************************************************************* * Copyright 2022 Stefan Majewsky * SPDX-License-Identifier: GPL-3.0-only * Refer to the file "LICENSE" for details. *******************************************************************************/ package main import ( "fmt" "os" ) func main() { scanResult := Scan() fmt.Printf("%#v", scanResult) } func must(err error) { if err != nil { fail(err.Error()) } } func fail(msg string, args ...interface{}) { if len(args) > 0 { msg = fmt.Sprintf(msg, args...) } fmt.Fprintln(os.Stderr, "ERROR: ", msg) os.Exit(1) }