diff --git a/main.go b/main.go index 4fac1c2..1728cbb 100644 --- a/main.go +++ b/main.go @@ -10,7 +10,6 @@ import ( "io" "io/ioutil" "os" - "regexp" "strings" "syscall" "github.com/h2non/filetype" @@ -74,23 +73,6 @@ func data2file(filename string, data []byte) { f.Write(data) } -func getMode() string { - var mode string - match, _ := regexp.Match(`.*\.hdn$`,[]byte(FileName)) - if match { - return "s" - } - fmt.Print("mode: ") - fmt.Fscan(os.Stdin, &mode) - if mode == "q" {os.Exit(1)} - if mode != "h" && mode != "s" { - fmt.Println("not a mode") - fmt.Println("type 'h' for hide, 's' for show or 'q' to quit") - mode = getMode() - } - return mode -} - func readFn() string { var filename string arg := os.Args[1:]