aboutsummaryrefslogtreecommitdiffstats
path: root/store.go
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2012-04-18 23:12:34 -0400
committerbnewbold <bnewbold@robocracy.org>2012-04-18 23:12:34 -0400
commit9c034ab99f8632db38a6c205b848137ebb506d28 (patch)
tree5d8b07777464d51ad2c5551690e1e55fbe05742c /store.go
parentb6a2d46c5bbdca7ca5d3e50eece732b5b839f2c5 (diff)
downloadbommom-9c034ab99f8632db38a6c205b848137ebb506d28.tar.gz
bommom-9c034ab99f8632db38a6c205b848137ebb506d28.zip
go fmt update
Diffstat (limited to 'store.go')
-rw-r--r--store.go24
1 files changed, 12 insertions, 12 deletions
diff --git a/store.go b/store.go
index 343cd9e..7cbf360 100644
--- a/store.go
+++ b/store.go
@@ -130,20 +130,20 @@ func (jfbs *JSONFileBomStore) listBomsForUser(user ShortName) ([]BomStub, error)
func (jfbs *JSONFileBomStore) Persist(bs *BomStub, b *Bom, version ShortName) error {
- if err := bs.Validate(); err != nil {
- return err
- }
- if err := b.Validate(); err != nil {
- return err
- }
-
+ if err := bs.Validate(); err != nil {
+ return err
+ }
+ if err := b.Validate(); err != nil {
+ return err
+ }
+
b_fpath := jfbs.Rootfpath + "/" + string(bs.Owner) + "/" + string(bs.Name) + "/" + string(version) + ".json"
bs_fpath := jfbs.Rootfpath + "/" + string(bs.Owner) + "/" + string(bs.Name) + "/_meta.json"
-
- if f, err := os.Open(b_fpath); err == nil {
- f.Close()
- return Error("bom with same owner, name, and version already exists")
- }
+
+ if f, err := os.Open(b_fpath); err == nil {
+ f.Close()
+ return Error("bom with same owner, name, and version already exists")
+ }
if err := writeJsonBomStub(bs_fpath, bs); err != nil {
log.Fatal(err)
}