From 7c52c2d5d09a302ee77e5548b0806fd422586425 Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Sat, 31 Aug 2024 21:10:34 +0200 Subject: [PATCH] prepare prompting for config data --- cmd/save.go | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/cmd/save.go b/cmd/save.go index b819d18..7edeee2 100644 --- a/cmd/save.go +++ b/cmd/save.go @@ -2,9 +2,6 @@ package cmd import ( "fmt" - "os" - "os/signal" - "syscall" "github.com/spf13/cobra" ) @@ -14,13 +11,13 @@ var saveCmd = &cobra.Command{ Use: "save", Short: "Save a new internet proxy config", Run: func(cmd *cobra.Command, args []string) { - fmt.Printf("Saving New Proxy Config...\n") + var name string + fmt.Print("Name: ") + fmt.Scanln(&name) - // Block process until interrupted - done := make(chan os.Signal, 1) - signal.Notify(done, syscall.SIGINT, syscall.SIGTERM) - fmt.Println("Blocking, press ctrl+c to continue...") - <-done + var command string + fmt.Print("Command? ") + fmt.Scanln(&command) }, }