make a special case for print
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
2f736cfe5e
commit
f95b9e1166
1 changed files with 3 additions and 2 deletions
|
|
@ -136,8 +136,6 @@ func main() {
|
|||
})
|
||||
defer DB.Close()
|
||||
|
||||
printDB()
|
||||
|
||||
if len(os.Args) < 2 {
|
||||
fmt.Println("Usage: db <cmd> [args...]")
|
||||
return
|
||||
|
|
@ -186,6 +184,9 @@ func main() {
|
|||
}
|
||||
line, _ := GetFromDB(os.Args[2], os.Args[3])
|
||||
fmt.Println(line)
|
||||
case "print":
|
||||
printDB()
|
||||
os.Exit(1)
|
||||
default:
|
||||
fmt.Println("Unknown command:", cmd)
|
||||
os.Exit(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue