aboutsummaryrefslogtreecommitdiff
path: root/src/shell.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2013-02-10 03:53:52 -0800
committerChris Lu <chris.lu@gmail.com>2013-02-10 03:53:52 -0800
commit37a1a70cc3c960eb288257646d4888eb75473fc6 (patch)
tree0c4bc8a286597cd79e22b1ce02cd9cd3b1c44602 /src/shell.go
parent7743ddd7db7e1d448964b4dc9561650282519650 (diff)
downloadseaweedfs-37a1a70cc3c960eb288257646d4888eb75473fc6.tar.xz
seaweedfs-37a1a70cc3c960eb288257646d4888eb75473fc6.zip
remove unused files
Diffstat (limited to 'src/shell.go')
-rw-r--r--src/shell.go53
1 files changed, 0 insertions, 53 deletions
diff --git a/src/shell.go b/src/shell.go
deleted file mode 100644
index daf0b7e1f..000000000
--- a/src/shell.go
+++ /dev/null
@@ -1,53 +0,0 @@
-package main
-
-import (
- "bufio"
- "fmt"
- "os"
-)
-
-func init() {
- cmdShell.Run = runShell // break init cycle
-}
-
-var cmdShell = &Command{
- UsageLine: "shell",
- Short: "run interactive commands, now just echo",
- Long: `run interactive commands.
-
- `,
-}
-
-var ()
-
-func runShell(command *Command, args []string) bool {
- r := bufio.NewReader(os.Stdin)
- o := bufio.NewWriter(os.Stdout)
- e := bufio.NewWriter(os.Stderr)
- prompt := func() {
- o.WriteString("> ")
- o.Flush()
- }
- readLine := func() string {
- ret, err := r.ReadString('\n')
- if err != nil {
- fmt.Fprint(e, err)
- os.Exit(1)
- }
- return ret
- }
- execCmd := func(cmd string) int {
- if cmd != "" {
- o.WriteString(cmd)
- }
- return 0
- }
-
- cmd := ""
- for {
- prompt()
- cmd = readLine()
- execCmd(cmd)
- }
- return true
-}