Skip to content

Commit 7e3db7c

Browse files
committed
update: fix msg output, go vet
1 parent 7d5833c commit 7e3db7c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ipvs/netlink.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"encoding/binary"
1212
"fmt"
1313
"net"
14+
"os"
1415
"os/exec"
1516
"strings"
1617
"sync"
@@ -65,7 +66,8 @@ func setup() {
6566
ipvsOnce.Do(func() {
6667
var err error
6768
if out, err := exec.Command("modprobe", "-va", "ip_vs").CombinedOutput(); err != nil {
68-
fmt.Sprintf("Running modprobe ip_vs failed with message: `%s`, error: %v", strings.TrimSpace(string(out)), err)
69+
fmt.Fprintf(os.Stderr, "Running modprobe ip_vs failed with message: `%s`, error: %v", strings.TrimSpace(string(out)), err)
70+
os.Exit(1)
6971
}
7072

7173
ipvsFamily, err = getIPVSFamily()

0 commit comments

Comments
 (0)