Merge branch 'main' of https://git.tornberg.me/mats/go-cart-actor
All checks were successful
Build and Publish / Metadata (push) Successful in 11s
Build and Publish / BuildAndDeployAmd64 (push) Successful in 49s
Build and Publish / BuildAndDeployArm64 (push) Successful in 4m37s

This commit is contained in:
2025-11-10 19:47:23 +01:00
14 changed files with 588 additions and 106 deletions

View File

@@ -44,18 +44,25 @@ func main() {
s.UpdateInventory(p, "4", "4", 40)
return nil
})
err = s.ReserveInventory(inventory.ReserveRequest{
SKU: "1",
LocationID: "1",
Quantity: 3,
}, inventory.ReserveRequest{
SKU: "2",
LocationID: "2",
Quantity: 15,
})
err = s.ReserveInventory(
inventory.ReserveRequest{
SKU: "1",
LocationID: "1",
Quantity: 3,
},
inventory.ReserveRequest{
SKU: "2",
LocationID: "2",
Quantity: 15,
},
inventory.ReserveRequest{
SKU: "3",
LocationID: "3",
Quantity: 25,
},
)
if err != nil {
log.Printf("Unable to reserve inventory: %v", err)
return
}
v, err := s.GetInventory("1", "1")
if err != nil {