Fix: avoid silent fatalities

demo: https://tcp.ac/i/JMSUc.gif
This commit is contained in:
kayos@tcp.direct 2024-06-17 00:30:24 -07:00
parent 3337efcb8f
commit 395f5ab6bc
No known key found for this signature in database
GPG key ID: 4B841471B4BEE979
13 changed files with 115 additions and 78 deletions

View file

@ -4,8 +4,9 @@ import (
"fmt"
"strings"
"github.com/HikariKnight/ls-iommu/pkg/errorcheck"
"github.com/gookit/color"
"github.com/HikariKnight/quickpassthrough/internal/common"
)
func ManualInput(msg string, format string) []string {
@ -18,7 +19,7 @@ func ManualInput(msg string, format string) []string {
// Get the user input
var input string
_, err := fmt.Scan(&input)
errorcheck.ErrorCheck(err)
common.ErrorCheck(err)
input_list := strings.Split(input, ",")