getMode func removed

This commit is contained in:
ed 2019-12-18 22:44:22 +01:00
parent 69fdf6b6ed
commit a3623f8e7e
1 changed files with 0 additions and 18 deletions

18
main.go
View File

@ -10,7 +10,6 @@ import (
"io" "io"
"io/ioutil" "io/ioutil"
"os" "os"
"regexp"
"strings" "strings"
"syscall" "syscall"
"github.com/h2non/filetype" "github.com/h2non/filetype"
@ -74,23 +73,6 @@ func data2file(filename string, data []byte) {
f.Write(data) 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 { func readFn() string {
var filename string var filename string
arg := os.Args[1:] arg := os.Args[1:]