diff --git a/cmd/utils.go b/cmd/utils.go index fd32851..2412cae 100644 --- a/cmd/utils.go +++ b/cmd/utils.go @@ -58,6 +58,9 @@ var keyCmd = &cobra.Command{ } fmt.Println(string(privKeyStr)) pubKeyStr, err := privKey.Pubkey().MarshalText() + if err != nil { + panic(err) + } _, err = fmt.Fprintln(os.Stderr, string(pubKeyStr)) if err != nil { panic(err) diff --git a/core/sys_darwin.go b/core/sys_darwin.go index e958056..55ab99a 100644 --- a/core/sys_darwin.go +++ b/core/sys_darwin.go @@ -11,6 +11,9 @@ import ( func InitUAPI(logger *slog.Logger, itfName string) (net.Listener, error) { fileUAPI, err := ipc.UAPIOpen(itfName) + if err != nil { + return nil, err + } uapi, err := ipc.UAPIListen(itfName, fileUAPI) if err != nil { diff --git a/core/sys_linux.go b/core/sys_linux.go index 0fe998a..c38ec04 100644 --- a/core/sys_linux.go +++ b/core/sys_linux.go @@ -12,6 +12,9 @@ import ( func InitUAPI(logger *slog.Logger, itfName string) (net.Listener, error) { fileUAPI, err := ipc.UAPIOpen(itfName) + if err != nil { + return nil, err + } uapi, err := ipc.UAPIListen(itfName, fileUAPI) if err != nil { diff --git a/state/distribution.go b/state/distribution.go index 9b56d20..bfcd0eb 100644 --- a/state/distribution.go +++ b/state/distribution.go @@ -78,6 +78,9 @@ func BundleConfig(config string, rootKey NyPrivateKey) (string, error) { cfg.Timestamp = time.Now().UnixNano() plainText, err := yaml.Marshal(cfg) + if err != nil { + return "", err + } bundle, err := SignBundle(plainText, rootKey) if err != nil {