usage
This commit is contained in:
parent
d92c619297
commit
c39399e9b8
4
serra.go
4
serra.go
@ -12,7 +12,7 @@ func main() {
|
|||||||
usage := `Archivar
|
usage := `Archivar
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
serra add <path>...
|
serra add <card>...
|
||||||
serra update <path>...
|
serra update <path>...
|
||||||
serra value <path>...
|
serra value <path>...
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ Options:
|
|||||||
args, _ := docopt.ParseDoc(usage)
|
args, _ := docopt.ParseDoc(usage)
|
||||||
|
|
||||||
if args["add"].(bool) {
|
if args["add"].(bool) {
|
||||||
serra.Add(args["<path>"].([]string))
|
serra.Add(args["<card>"].([]string))
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package serra
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
@ -34,7 +35,7 @@ func storage_add(coll *mongo.Collection, card *Card) error {
|
|||||||
|
|
||||||
_, err := coll.InsertOne(context.TODO(), card)
|
_, err := coll.InsertOne(context.TODO(), card)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
fmt.Println(err)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user