From 9c034ab99f8632db38a6c205b848137ebb506d28 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Wed, 18 Apr 2012 23:12:34 -0400 Subject: go fmt update --- store.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'store.go') 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) } -- cgit v1.2.3