aboutsummaryrefslogtreecommitdiffstats
path: root/bommom.go
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2012-04-19 01:03:40 -0400
committerbnewbold <bnewbold@robocracy.org>2012-04-19 01:03:40 -0400
commit2d81a2a6ad8aa059c6249a2299a13c6867df0766 (patch)
treeaf7a76f28532b95c38e963fd9d543727be308942 /bommom.go
parent90f7cebfb43708835aa26c57206d7c9dc9183a50 (diff)
downloadbommom-2d81a2a6ad8aa059c6249a2299a13c6867df0766.zip
bommom-2d81a2a6ad8aa059c6249a2299a13c6867df0766.tar.gz
more loading
Diffstat (limited to 'bommom.go')
-rw-r--r--bommom.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/bommom.go b/bommom.go
index 4441353..11b47c4 100644
--- a/bommom.go
+++ b/bommom.go
@@ -211,7 +211,7 @@ func dumpCmd() {
func loadCmd() {
if flag.NArg() != 5 {
- log.Fatal("Error: wrong number of arguments (expected input file, username, bomname)")
+ log.Fatal("Error: wrong number of arguments (expected input file, username, bomname, version)")
}
var userName, bomName, version string
@@ -234,10 +234,13 @@ func loadCmd() {
bm.Name = bomName
b.Progeny = "File import from " + inFname + " (" + inFormat + ")"
b.Created = time.Now()
+ b.Version = version
openBomStore()
- bomstore.Persist(bm, b, ShortName(version))
+ if err := bomstore.Persist(bm, b, ShortName(version)); err != nil {
+ log.Fatal(err)
+ }
}
func convertCmd() {