Gofmt
This commit is contained in:
parent
9c7d2ca000
commit
df0482dac2
|
@ -11,7 +11,7 @@ func TestAddOrUpdatePublisher(t *testing.T) {
|
||||||
|
|
||||||
// Bootstrap our test publisher
|
// Bootstrap our test publisher
|
||||||
testpublisher := Publisher{
|
testpublisher := Publisher{
|
||||||
Name: "Testpublisher",
|
Name: "Testpublisher",
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete every prexisting publisher to have a fresh start
|
// Delete every prexisting publisher to have a fresh start
|
||||||
|
|
|
@ -9,11 +9,11 @@ func AddOrUpdatePublisher(publisher Publisher) (newPublisher Publisher, err erro
|
||||||
return Publisher{}, fmt.Errorf("You need at least a name to insert a new publisher")
|
return Publisher{}, fmt.Errorf("You need at least a name to insert a new publisher")
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err = x.Insert(&publisher)
|
_, err = x.Insert(&publisher)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return Publisher{}, err
|
return Publisher{}, err
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
_, err = x.ID(publisher.ID).Update(&publisher)
|
_, err = x.ID(publisher.ID).Update(&publisher)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue